Shader "Standard" {
Properties {
 _Color ("Color", Color) = (1,1,1,1)
 _MainTex ("Albedo", 2D) = "white" { }
 _Cutoff ("Alpha Cutoff", Range(0,1)) = 0.5
 _Glossiness ("Smoothness", Range(0,1)) = 0.5
[Gamma]  _Metallic ("Metallic", Range(0,1)) = 0
 _MetallicGlossMap ("Metallic", 2D) = "white" { }
 _BumpScale ("Scale", Float) = 1
 _BumpMap ("Normal Map", 2D) = "bump" { }
 _Parallax ("Height Scale", Range(0.005,0.08)) = 0.02
 _ParallaxMap ("Height Map", 2D) = "black" { }
 _OcclusionStrength ("Strength", Range(0,1)) = 1
 _OcclusionMap ("Occlusion", 2D) = "white" { }
 _EmissionColor ("Color", Color) = (0,0,0,1)
 _EmissionMap ("Emission", 2D) = "white" { }
 _DetailMask ("Detail Mask", 2D) = "white" { }
 _DetailAlbedoMap ("Detail Albedo x2", 2D) = "grey" { }
 _DetailNormalMapScale ("Scale", Float) = 1
 _DetailNormalMap ("Normal Map", 2D) = "bump" { }
[Enum(UV0,0,UV1,1)]  _UVSec ("UV Set for secondary textures", Float) = 0
[HideInInspector]  _Mode ("__mode", Float) = 0
[HideInInspector]  _SrcBlend ("__src", Float) = 1
[HideInInspector]  _DstBlend ("__dst", Float) = 0
[HideInInspector]  _ZWrite ("__zw", Float) = 1
}
SubShader { 
 LOD 300
 Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
 Pass {
  Name "FORWARD"
  Tags { "LIGHTMODE"="ForwardBase" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" }
  ZWrite [_ZWrite]
  Blend [_SrcBlend] [_DstBlend]
  GpuProgramID 39223
Program "vp" {
}
Program "fp" {
}
 }
 Pass {
  Name "FORWARD_DELTA"
  Tags { "LIGHTMODE"="ForwardAdd" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" }
  ZWrite Off
  Blend [_SrcBlend] One
  GpuProgramID 129312
Program "vp" {
}
Program "fp" {
}
 }
 Pass {
  Name "SHADOWCASTER"
  Tags { "LIGHTMODE"="SHADOWCASTER" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" }
  GpuProgramID 147192
Program "vp" {
}
Program "fp" {
}
 }
 Pass {
  Name "DEFERRED"
  Tags { "LIGHTMODE"="Deferred" "RenderType"="Opaque" "PerformanceChecks"="False" }
  GpuProgramID 219902
Program "vp" {
}
Program "fp" {
}
 }
}
SubShader { 
 LOD 150
 Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
 Pass {
  Name "FORWARD"
  Tags { "LIGHTMODE"="ForwardBase" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" }
  ZWrite [_ZWrite]
  Blend [_SrcBlend] [_DstBlend]
  GpuProgramID 358221
Program "vp" {
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_OFF" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform mediump vec4 unity_SHAr;
uniform mediump vec4 unity_SHAg;
uniform mediump vec4 unity_SHAb;
uniform mediump vec4 unity_SHBr;
uniform mediump vec4 unity_SHBg;
uniform mediump vec4 unity_SHBb;
uniform mediump vec4 unity_SHC;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying highp vec3 xlv_TEXCOORD8;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  highp vec4 tmpvar_4;
  mediump vec4 tmpvar_5;
  mediump vec4 tmpvar_6;
  mediump vec4 tmpvar_7;
  highp vec3 tmpvar_8;
  highp vec4 tmpvar_9;
  tmpvar_9 = (_Object2World * _glesVertex);
  tmpvar_8 = tmpvar_9.xyz;
  tmpvar_4 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_10;
  texcoord_10.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_11;
  if ((_UVSec == 0.0)) {
    tmpvar_11 = tmpvar_2;
  } else {
    tmpvar_11 = tmpvar_3;
  };
  texcoord_10.zw = ((tmpvar_11 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_12;
  n_12 = (tmpvar_9.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_13;
  norm_13 = tmpvar_1;
  highp vec4 v_14;
  v_14.x = _World2Object[0].x;
  v_14.y = _World2Object[1].x;
  v_14.z = _World2Object[2].x;
  v_14.w = _World2Object[3].x;
  highp vec4 v_15;
  v_15.x = _World2Object[0].y;
  v_15.y = _World2Object[1].y;
  v_15.z = _World2Object[2].y;
  v_15.w = _World2Object[3].y;
  highp vec4 v_16;
  v_16.x = _World2Object[0].z;
  v_16.y = _World2Object[1].z;
  v_16.z = _World2Object[2].z;
  v_16.w = _World2Object[3].z;
  highp vec3 tmpvar_17;
  tmpvar_17 = normalize(((
    (v_14.xyz * norm_13.x)
   + 
    (v_15.xyz * norm_13.y)
  ) + (v_16.xyz * norm_13.z)));
  tmpvar_5.xyz = vec3(0.0, 0.0, 0.0);
  tmpvar_6.xyz = vec3(0.0, 0.0, 0.0);
  tmpvar_7.xyz = tmpvar_17;
  mediump vec3 normalWorld_18;
  normalWorld_18 = tmpvar_17;
  mediump vec4 ambientOrLightmapUV_19;
  ambientOrLightmapUV_19.w = 0.0;
  mediump vec4 tmpvar_20;
  tmpvar_20.w = 1.0;
  tmpvar_20.xyz = normalWorld_18;
  mediump vec3 res_21;
  mediump vec3 x_22;
  x_22.x = dot (unity_SHAr, tmpvar_20);
  x_22.y = dot (unity_SHAg, tmpvar_20);
  x_22.z = dot (unity_SHAb, tmpvar_20);
  mediump vec3 x1_23;
  mediump vec4 tmpvar_24;
  tmpvar_24 = (normalWorld_18.xyzz * normalWorld_18.yzzx);
  x1_23.x = dot (unity_SHBr, tmpvar_24);
  x1_23.y = dot (unity_SHBg, tmpvar_24);
  x1_23.z = dot (unity_SHBb, tmpvar_24);
  res_21 = (x_22 + (x1_23 + (unity_SHC.xyz * 
    ((normalWorld_18.x * normalWorld_18.x) - (normalWorld_18.y * normalWorld_18.y))
  )));
  res_21 = max (((1.055 * 
    pow (max (res_21, vec3(0.0, 0.0, 0.0)), vec3(0.4166667, 0.4166667, 0.4166667))
  ) - 0.055), vec3(0.0, 0.0, 0.0));
  ambientOrLightmapUV_19.xyz = res_21;
  gl_Position = tmpvar_4;
  xlv_TEXCOORD0 = texcoord_10;
  xlv_TEXCOORD1 = normalize(n_12);
  xlv_TEXCOORD2 = tmpvar_5;
  xlv_TEXCOORD2_1 = tmpvar_6;
  xlv_TEXCOORD2_2 = tmpvar_7;
  xlv_TEXCOORD5 = ambientOrLightmapUV_19;
  xlv_TEXCOORD8 = tmpvar_8;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 _WorldSpaceLightPos0;
uniform lowp samplerCube unity_SpecCube0;
uniform lowp samplerCube unity_SpecCube1;
uniform highp vec4 unity_SpecCube0_BoxMax;
uniform highp vec4 unity_SpecCube0_BoxMin;
uniform highp vec4 unity_SpecCube0_ProbePosition;
uniform mediump vec4 unity_SpecCube0_HDR;
uniform highp vec4 unity_SpecCube1_BoxMax;
uniform highp vec4 unity_SpecCube1_BoxMin;
uniform highp vec4 unity_SpecCube1_ProbePosition;
uniform mediump vec4 unity_SpecCube1_HDR;
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform sampler2D _OcclusionMap;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying highp vec3 xlv_TEXCOORD8;
void main ()
{
  mediump vec4 c_1;
  mediump vec3 i_posWorld_2;
  i_posWorld_2 = xlv_TEXCOORD8;
  lowp vec4 tmpvar_3;
  tmpvar_3 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_4;
  tmpvar_4 = (_Color.xyz * tmpvar_3.xyz);
  mediump vec3 tmpvar_5;
  mediump vec3 tmpvar_6;
  tmpvar_6 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_4, vec3(_Metallic));
  mediump float tmpvar_7;
  tmpvar_7 = (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w));
  tmpvar_5 = (tmpvar_4 * tmpvar_7);
  mediump vec3 tmpvar_8;
  tmpvar_8 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_9;
  tmpvar_9 = _LightColor0.xyz;
  mediump float tmpvar_10;
  lowp vec4 tmpvar_11;
  tmpvar_11 = texture2D (_OcclusionMap, xlv_TEXCOORD0.xy);
  tmpvar_10 = tmpvar_11.y;
  mediump float tmpvar_12;
  tmpvar_12 = clamp (dot (tmpvar_8, _WorldSpaceLightPos0.xyz), 0.0, 1.0);
  highp vec3 tmpvar_13;
  highp vec4 tmpvar_14;
  highp vec4 tmpvar_15;
  tmpvar_13 = i_posWorld_2;
  tmpvar_14 = unity_SpecCube0_HDR;
  tmpvar_15 = unity_SpecCube1_HDR;
  mediump vec3 tmpvar_16;
  mediump vec3 tmpvar_17;
  tmpvar_16 = (xlv_TEXCOORD5.xyz * tmpvar_10);
  tmpvar_17 = vec3(0.0, 0.0, 0.0);
  mediump float tmpvar_18;
  mediump vec3 tmpvar_19;
  tmpvar_18 = (1.0 - _Glossiness);
  tmpvar_19 = (xlv_TEXCOORD1 - (2.0 * (
    dot (tmpvar_8, xlv_TEXCOORD1)
   * tmpvar_8)));
  mediump vec3 originalReflUVW_20;
  mediump vec3 specular_21;
  originalReflUVW_20 = tmpvar_19;
  mediump vec3 worldRefl_22;
  worldRefl_22 = tmpvar_19;
  highp vec3 worldPos_23;
  worldPos_23 = tmpvar_13;
  if ((unity_SpecCube0_ProbePosition.w > 0.0)) {
    mediump vec3 rbmin_24;
    mediump vec3 rbmax_25;
    mediump vec3 tmpvar_26;
    tmpvar_26 = normalize(tmpvar_19);
    highp vec3 tmpvar_27;
    tmpvar_27 = ((unity_SpecCube0_BoxMax.xyz - tmpvar_13) / tmpvar_26);
    rbmax_25 = tmpvar_27;
    highp vec3 tmpvar_28;
    tmpvar_28 = ((unity_SpecCube0_BoxMin.xyz - tmpvar_13) / tmpvar_26);
    rbmin_24 = tmpvar_28;
    bvec3 tmpvar_29;
    tmpvar_29 = greaterThan (tmpvar_26, vec3(0.0, 0.0, 0.0));
    mediump float tmpvar_30;
    if (tmpvar_29.x) {
      tmpvar_30 = rbmax_25.x;
    } else {
      tmpvar_30 = rbmin_24.x;
    };
    mediump float tmpvar_31;
    if (tmpvar_29.y) {
      tmpvar_31 = rbmax_25.y;
    } else {
      tmpvar_31 = rbmin_24.y;
    };
    mediump float tmpvar_32;
    if (tmpvar_29.z) {
      tmpvar_32 = rbmax_25.z;
    } else {
      tmpvar_32 = rbmin_24.z;
    };
    worldPos_23 = (tmpvar_13 - unity_SpecCube0_ProbePosition.xyz);
    worldRefl_22 = (worldPos_23 + (tmpvar_26 * min (
      min (tmpvar_30, tmpvar_31)
    , tmpvar_32)));
  };
  tmpvar_19 = worldRefl_22;
  mediump vec4 hdr_33;
  hdr_33 = tmpvar_14;
  mediump vec4 tmpvar_34;
  tmpvar_34.xyz = worldRefl_22;
  tmpvar_34.w = ((tmpvar_18 * (1.7 - 
    (0.7 * tmpvar_18)
  )) * 6.0);
  lowp vec4 tmpvar_35;
  tmpvar_35 = textureCube (unity_SpecCube0, worldRefl_22, tmpvar_34.w);
  mediump vec4 tmpvar_36;
  tmpvar_36 = tmpvar_35;
  mediump vec3 tmpvar_37;
  tmpvar_37 = ((tmpvar_36.w * hdr_33.x) * tmpvar_36.xyz);
  if ((unity_SpecCube0_BoxMin.w < 0.99999)) {
    mediump vec3 worldRefl_38;
    worldRefl_38 = originalReflUVW_20;
    highp vec3 worldPos_39;
    worldPos_39 = tmpvar_13;
    if ((unity_SpecCube1_ProbePosition.w > 0.0)) {
      mediump vec3 rbmin_40;
      mediump vec3 rbmax_41;
      mediump vec3 tmpvar_42;
      tmpvar_42 = normalize(originalReflUVW_20);
      highp vec3 tmpvar_43;
      tmpvar_43 = ((unity_SpecCube1_BoxMax.xyz - tmpvar_13) / tmpvar_42);
      rbmax_41 = tmpvar_43;
      highp vec3 tmpvar_44;
      tmpvar_44 = ((unity_SpecCube1_BoxMin.xyz - tmpvar_13) / tmpvar_42);
      rbmin_40 = tmpvar_44;
      bvec3 tmpvar_45;
      tmpvar_45 = greaterThan (tmpvar_42, vec3(0.0, 0.0, 0.0));
      mediump float tmpvar_46;
      if (tmpvar_45.x) {
        tmpvar_46 = rbmax_41.x;
      } else {
        tmpvar_46 = rbmin_40.x;
      };
      mediump float tmpvar_47;
      if (tmpvar_45.y) {
        tmpvar_47 = rbmax_41.y;
      } else {
        tmpvar_47 = rbmin_40.y;
      };
      mediump float tmpvar_48;
      if (tmpvar_45.z) {
        tmpvar_48 = rbmax_41.z;
      } else {
        tmpvar_48 = rbmin_40.z;
      };
      worldPos_39 = (tmpvar_13 - unity_SpecCube1_ProbePosition.xyz);
      worldRefl_38 = (worldPos_39 + (tmpvar_42 * min (
        min (tmpvar_46, tmpvar_47)
      , tmpvar_48)));
    };
    tmpvar_19 = worldRefl_38;
    mediump vec4 hdr_49;
    hdr_49 = tmpvar_15;
    mediump vec4 tmpvar_50;
    tmpvar_50.xyz = worldRefl_38;
    tmpvar_50.w = ((tmpvar_18 * (1.7 - 
      (0.7 * tmpvar_18)
    )) * 6.0);
    lowp vec4 tmpvar_51;
    tmpvar_51 = textureCube (unity_SpecCube1, worldRefl_38, tmpvar_50.w);
    mediump vec4 tmpvar_52;
    tmpvar_52 = tmpvar_51;
    mediump vec3 tmpvar_53;
    tmpvar_53 = ((tmpvar_52.w * hdr_49.x) * tmpvar_52.xyz);
    highp vec3 tmpvar_54;
    tmpvar_54 = mix (tmpvar_53, tmpvar_37, unity_SpecCube0_BoxMin.www);
    specular_21 = tmpvar_54;
  } else {
    specular_21 = tmpvar_37;
  };
  tmpvar_17 = (specular_21 * tmpvar_10);
  mediump vec3 viewDir_55;
  viewDir_55 = -(xlv_TEXCOORD1);
  mediump float specularTerm_56;
  mediump float tmpvar_57;
  tmpvar_57 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_58;
  mediump vec3 inVec_59;
  inVec_59 = (_WorldSpaceLightPos0.xyz + viewDir_55);
  tmpvar_58 = (inVec_59 * inversesqrt(max (0.001, 
    dot (inVec_59, inVec_59)
  )));
  mediump float tmpvar_60;
  tmpvar_60 = clamp (dot (tmpvar_8, tmpvar_58), 0.0, 1.0);
  mediump float tmpvar_61;
  tmpvar_61 = clamp (dot (tmpvar_8, viewDir_55), 0.0, 1.0);
  mediump float tmpvar_62;
  tmpvar_62 = clamp (dot (_WorldSpaceLightPos0.xyz, tmpvar_58), 0.0, 1.0);
  mediump float tmpvar_63;
  tmpvar_63 = (tmpvar_57 * tmpvar_57);
  mediump float tmpvar_64;
  tmpvar_64 = (tmpvar_57 * tmpvar_57);
  mediump float tmpvar_65;
  tmpvar_65 = (tmpvar_64 * tmpvar_64);
  mediump float tmpvar_66;
  tmpvar_66 = (((tmpvar_60 * tmpvar_60) * (tmpvar_65 - 1.0)) + 1.0);
  mediump float x_67;
  x_67 = (1.0 - tmpvar_12);
  mediump float x_68;
  x_68 = (1.0 - tmpvar_61);
  mediump float tmpvar_69;
  tmpvar_69 = (0.5 + ((2.0 * tmpvar_62) * (tmpvar_62 * tmpvar_57)));
  specularTerm_56 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_12) / ((
      (tmpvar_12 * ((tmpvar_61 * (1.0 - tmpvar_63)) + tmpvar_63))
     + 
      (tmpvar_61 * ((tmpvar_12 * (1.0 - tmpvar_63)) + tmpvar_63))
    ) + 1e-05)) * (tmpvar_65 / ((3.141593 * tmpvar_66) * tmpvar_66)))
   * 0.7853982)));
  mediump float tmpvar_70;
  tmpvar_70 = max (0.0, (specularTerm_56 * tmpvar_12));
  specularTerm_56 = tmpvar_70;
  mediump float x_71;
  x_71 = (1.0 - tmpvar_62);
  mediump float x_72;
  x_72 = (1.0 - tmpvar_61);
  mediump vec3 tmpvar_73;
  tmpvar_73 = (((tmpvar_5 * 
    (tmpvar_16 + (tmpvar_9 * ((
      (1.0 + ((tmpvar_69 - 1.0) * ((x_67 * x_67) * (
        (x_67 * x_67)
       * x_67))))
     * 
      (1.0 + ((tmpvar_69 - 1.0) * ((x_68 * x_68) * (
        (x_68 * x_68)
       * x_68))))
    ) * tmpvar_12)))
  ) + (
    (tmpvar_70 * tmpvar_9)
   * 
    (tmpvar_6 + ((1.0 - tmpvar_6) * ((x_71 * x_71) * (
      (x_71 * x_71)
     * x_71))))
  )) + (tmpvar_17 * mix (tmpvar_6, vec3(
    clamp ((_Glossiness + (1.0 - tmpvar_7)), 0.0, 1.0)
  ), vec3(
    ((x_72 * x_72) * ((x_72 * x_72) * x_72))
  ))));
  mediump vec4 tmpvar_74;
  tmpvar_74.w = 1.0;
  tmpvar_74.xyz = tmpvar_73;
  c_1.w = tmpvar_74.w;
  c_1.xyz = tmpvar_73;
  c_1.xyz = c_1.xyz;
  mediump vec4 xlat_varoutput_75;
  xlat_varoutput_75.xyz = c_1.xyz;
  xlat_varoutput_75.w = 1.0;
  gl_FragData[0] = xlat_varoutput_75;
}


#endif
"
}
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _ProjectionParams;
uniform mediump vec4 unity_SHAr;
uniform mediump vec4 unity_SHAg;
uniform mediump vec4 unity_SHAb;
uniform mediump vec4 unity_SHBr;
uniform mediump vec4 unity_SHBg;
uniform mediump vec4 unity_SHBb;
uniform mediump vec4 unity_SHC;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
varying highp vec3 xlv_TEXCOORD8;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  highp vec4 tmpvar_4;
  mediump vec4 tmpvar_5;
  mediump vec4 tmpvar_6;
  mediump vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  highp vec3 tmpvar_9;
  highp vec4 tmpvar_10;
  tmpvar_10 = (_Object2World * _glesVertex);
  tmpvar_9 = tmpvar_10.xyz;
  tmpvar_4 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_11;
  texcoord_11.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_12;
  if ((_UVSec == 0.0)) {
    tmpvar_12 = tmpvar_2;
  } else {
    tmpvar_12 = tmpvar_3;
  };
  texcoord_11.zw = ((tmpvar_12 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_13;
  n_13 = (tmpvar_10.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_14;
  norm_14 = tmpvar_1;
  highp vec4 v_15;
  v_15.x = _World2Object[0].x;
  v_15.y = _World2Object[1].x;
  v_15.z = _World2Object[2].x;
  v_15.w = _World2Object[3].x;
  highp vec4 v_16;
  v_16.x = _World2Object[0].y;
  v_16.y = _World2Object[1].y;
  v_16.z = _World2Object[2].y;
  v_16.w = _World2Object[3].y;
  highp vec4 v_17;
  v_17.x = _World2Object[0].z;
  v_17.y = _World2Object[1].z;
  v_17.z = _World2Object[2].z;
  v_17.w = _World2Object[3].z;
  highp vec3 tmpvar_18;
  tmpvar_18 = normalize(((
    (v_15.xyz * norm_14.x)
   + 
    (v_16.xyz * norm_14.y)
  ) + (v_17.xyz * norm_14.z)));
  tmpvar_5.xyz = vec3(0.0, 0.0, 0.0);
  tmpvar_6.xyz = vec3(0.0, 0.0, 0.0);
  tmpvar_7.xyz = tmpvar_18;
  highp vec4 o_19;
  highp vec4 tmpvar_20;
  tmpvar_20 = (tmpvar_4 * 0.5);
  highp vec2 tmpvar_21;
  tmpvar_21.x = tmpvar_20.x;
  tmpvar_21.y = (tmpvar_20.y * _ProjectionParams.x);
  o_19.xy = (tmpvar_21 + tmpvar_20.w);
  o_19.zw = tmpvar_4.zw;
  tmpvar_8 = o_19;
  mediump vec3 normalWorld_22;
  normalWorld_22 = tmpvar_18;
  mediump vec4 ambientOrLightmapUV_23;
  ambientOrLightmapUV_23.w = 0.0;
  mediump vec4 tmpvar_24;
  tmpvar_24.w = 1.0;
  tmpvar_24.xyz = normalWorld_22;
  mediump vec3 res_25;
  mediump vec3 x_26;
  x_26.x = dot (unity_SHAr, tmpvar_24);
  x_26.y = dot (unity_SHAg, tmpvar_24);
  x_26.z = dot (unity_SHAb, tmpvar_24);
  mediump vec3 x1_27;
  mediump vec4 tmpvar_28;
  tmpvar_28 = (normalWorld_22.xyzz * normalWorld_22.yzzx);
  x1_27.x = dot (unity_SHBr, tmpvar_28);
  x1_27.y = dot (unity_SHBg, tmpvar_28);
  x1_27.z = dot (unity_SHBb, tmpvar_28);
  res_25 = (x_26 + (x1_27 + (unity_SHC.xyz * 
    ((normalWorld_22.x * normalWorld_22.x) - (normalWorld_22.y * normalWorld_22.y))
  )));
  res_25 = max (((1.055 * 
    pow (max (res_25, vec3(0.0, 0.0, 0.0)), vec3(0.4166667, 0.4166667, 0.4166667))
  ) - 0.055), vec3(0.0, 0.0, 0.0));
  ambientOrLightmapUV_23.xyz = res_25;
  gl_Position = tmpvar_4;
  xlv_TEXCOORD0 = texcoord_11;
  xlv_TEXCOORD1 = normalize(n_13);
  xlv_TEXCOORD2 = tmpvar_5;
  xlv_TEXCOORD2_1 = tmpvar_6;
  xlv_TEXCOORD2_2 = tmpvar_7;
  xlv_TEXCOORD5 = ambientOrLightmapUV_23;
  xlv_TEXCOORD6 = tmpvar_8;
  xlv_TEXCOORD8 = tmpvar_9;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 _WorldSpaceLightPos0;
uniform lowp samplerCube unity_SpecCube0;
uniform lowp samplerCube unity_SpecCube1;
uniform highp vec4 unity_SpecCube0_BoxMax;
uniform highp vec4 unity_SpecCube0_BoxMin;
uniform highp vec4 unity_SpecCube0_ProbePosition;
uniform mediump vec4 unity_SpecCube0_HDR;
uniform highp vec4 unity_SpecCube1_BoxMax;
uniform highp vec4 unity_SpecCube1_BoxMin;
uniform highp vec4 unity_SpecCube1_ProbePosition;
uniform mediump vec4 unity_SpecCube1_HDR;
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform sampler2D _OcclusionMap;
uniform sampler2D _ShadowMapTexture;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
varying highp vec3 xlv_TEXCOORD8;
void main ()
{
  mediump vec4 c_1;
  mediump float atten_2;
  mediump vec3 i_posWorld_3;
  i_posWorld_3 = xlv_TEXCOORD8;
  lowp vec4 tmpvar_4;
  tmpvar_4 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_5;
  tmpvar_5 = (_Color.xyz * tmpvar_4.xyz);
  mediump vec3 tmpvar_6;
  mediump vec3 tmpvar_7;
  tmpvar_7 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_5, vec3(_Metallic));
  mediump float tmpvar_8;
  tmpvar_8 = (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w));
  tmpvar_6 = (tmpvar_5 * tmpvar_8);
  mediump vec3 tmpvar_9;
  tmpvar_9 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_10;
  tmpvar_10 = _LightColor0.xyz;
  lowp float tmpvar_11;
  tmpvar_11 = texture2DProj (_ShadowMapTexture, xlv_TEXCOORD6).x;
  atten_2 = tmpvar_11;
  mediump float tmpvar_12;
  lowp vec4 tmpvar_13;
  tmpvar_13 = texture2D (_OcclusionMap, xlv_TEXCOORD0.xy);
  tmpvar_12 = tmpvar_13.y;
  mediump float tmpvar_14;
  tmpvar_14 = clamp (dot (tmpvar_9, _WorldSpaceLightPos0.xyz), 0.0, 1.0);
  highp vec3 tmpvar_15;
  highp vec4 tmpvar_16;
  highp vec4 tmpvar_17;
  tmpvar_15 = i_posWorld_3;
  tmpvar_16 = unity_SpecCube0_HDR;
  tmpvar_17 = unity_SpecCube1_HDR;
  mediump vec3 tmpvar_18;
  mediump vec3 tmpvar_19;
  mediump vec3 tmpvar_20;
  tmpvar_18 = (tmpvar_10 * atten_2);
  tmpvar_19 = (xlv_TEXCOORD5.xyz * tmpvar_12);
  tmpvar_20 = vec3(0.0, 0.0, 0.0);
  mediump float tmpvar_21;
  mediump vec3 tmpvar_22;
  tmpvar_21 = (1.0 - _Glossiness);
  tmpvar_22 = (xlv_TEXCOORD1 - (2.0 * (
    dot (tmpvar_9, xlv_TEXCOORD1)
   * tmpvar_9)));
  mediump vec3 originalReflUVW_23;
  mediump vec3 specular_24;
  originalReflUVW_23 = tmpvar_22;
  mediump vec3 worldRefl_25;
  worldRefl_25 = tmpvar_22;
  highp vec3 worldPos_26;
  worldPos_26 = tmpvar_15;
  if ((unity_SpecCube0_ProbePosition.w > 0.0)) {
    mediump vec3 rbmin_27;
    mediump vec3 rbmax_28;
    mediump vec3 tmpvar_29;
    tmpvar_29 = normalize(tmpvar_22);
    highp vec3 tmpvar_30;
    tmpvar_30 = ((unity_SpecCube0_BoxMax.xyz - tmpvar_15) / tmpvar_29);
    rbmax_28 = tmpvar_30;
    highp vec3 tmpvar_31;
    tmpvar_31 = ((unity_SpecCube0_BoxMin.xyz - tmpvar_15) / tmpvar_29);
    rbmin_27 = tmpvar_31;
    bvec3 tmpvar_32;
    tmpvar_32 = greaterThan (tmpvar_29, vec3(0.0, 0.0, 0.0));
    mediump float tmpvar_33;
    if (tmpvar_32.x) {
      tmpvar_33 = rbmax_28.x;
    } else {
      tmpvar_33 = rbmin_27.x;
    };
    mediump float tmpvar_34;
    if (tmpvar_32.y) {
      tmpvar_34 = rbmax_28.y;
    } else {
      tmpvar_34 = rbmin_27.y;
    };
    mediump float tmpvar_35;
    if (tmpvar_32.z) {
      tmpvar_35 = rbmax_28.z;
    } else {
      tmpvar_35 = rbmin_27.z;
    };
    worldPos_26 = (tmpvar_15 - unity_SpecCube0_ProbePosition.xyz);
    worldRefl_25 = (worldPos_26 + (tmpvar_29 * min (
      min (tmpvar_33, tmpvar_34)
    , tmpvar_35)));
  };
  tmpvar_22 = worldRefl_25;
  mediump vec4 hdr_36;
  hdr_36 = tmpvar_16;
  mediump vec4 tmpvar_37;
  tmpvar_37.xyz = worldRefl_25;
  tmpvar_37.w = ((tmpvar_21 * (1.7 - 
    (0.7 * tmpvar_21)
  )) * 6.0);
  lowp vec4 tmpvar_38;
  tmpvar_38 = textureCube (unity_SpecCube0, worldRefl_25, tmpvar_37.w);
  mediump vec4 tmpvar_39;
  tmpvar_39 = tmpvar_38;
  mediump vec3 tmpvar_40;
  tmpvar_40 = ((tmpvar_39.w * hdr_36.x) * tmpvar_39.xyz);
  if ((unity_SpecCube0_BoxMin.w < 0.99999)) {
    mediump vec3 worldRefl_41;
    worldRefl_41 = originalReflUVW_23;
    highp vec3 worldPos_42;
    worldPos_42 = tmpvar_15;
    if ((unity_SpecCube1_ProbePosition.w > 0.0)) {
      mediump vec3 rbmin_43;
      mediump vec3 rbmax_44;
      mediump vec3 tmpvar_45;
      tmpvar_45 = normalize(originalReflUVW_23);
      highp vec3 tmpvar_46;
      tmpvar_46 = ((unity_SpecCube1_BoxMax.xyz - tmpvar_15) / tmpvar_45);
      rbmax_44 = tmpvar_46;
      highp vec3 tmpvar_47;
      tmpvar_47 = ((unity_SpecCube1_BoxMin.xyz - tmpvar_15) / tmpvar_45);
      rbmin_43 = tmpvar_47;
      bvec3 tmpvar_48;
      tmpvar_48 = greaterThan (tmpvar_45, vec3(0.0, 0.0, 0.0));
      mediump float tmpvar_49;
      if (tmpvar_48.x) {
        tmpvar_49 = rbmax_44.x;
      } else {
        tmpvar_49 = rbmin_43.x;
      };
      mediump float tmpvar_50;
      if (tmpvar_48.y) {
        tmpvar_50 = rbmax_44.y;
      } else {
        tmpvar_50 = rbmin_43.y;
      };
      mediump float tmpvar_51;
      if (tmpvar_48.z) {
        tmpvar_51 = rbmax_44.z;
      } else {
        tmpvar_51 = rbmin_43.z;
      };
      worldPos_42 = (tmpvar_15 - unity_SpecCube1_ProbePosition.xyz);
      worldRefl_41 = (worldPos_42 + (tmpvar_45 * min (
        min (tmpvar_49, tmpvar_50)
      , tmpvar_51)));
    };
    tmpvar_22 = worldRefl_41;
    mediump vec4 hdr_52;
    hdr_52 = tmpvar_17;
    mediump vec4 tmpvar_53;
    tmpvar_53.xyz = worldRefl_41;
    tmpvar_53.w = ((tmpvar_21 * (1.7 - 
      (0.7 * tmpvar_21)
    )) * 6.0);
    lowp vec4 tmpvar_54;
    tmpvar_54 = textureCube (unity_SpecCube1, worldRefl_41, tmpvar_53.w);
    mediump vec4 tmpvar_55;
    tmpvar_55 = tmpvar_54;
    mediump vec3 tmpvar_56;
    tmpvar_56 = ((tmpvar_55.w * hdr_52.x) * tmpvar_55.xyz);
    highp vec3 tmpvar_57;
    tmpvar_57 = mix (tmpvar_56, tmpvar_40, unity_SpecCube0_BoxMin.www);
    specular_24 = tmpvar_57;
  } else {
    specular_24 = tmpvar_40;
  };
  tmpvar_20 = (specular_24 * tmpvar_12);
  mediump vec3 viewDir_58;
  viewDir_58 = -(xlv_TEXCOORD1);
  mediump float specularTerm_59;
  mediump float tmpvar_60;
  tmpvar_60 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_61;
  mediump vec3 inVec_62;
  inVec_62 = (_WorldSpaceLightPos0.xyz + viewDir_58);
  tmpvar_61 = (inVec_62 * inversesqrt(max (0.001, 
    dot (inVec_62, inVec_62)
  )));
  mediump float tmpvar_63;
  tmpvar_63 = clamp (dot (tmpvar_9, tmpvar_61), 0.0, 1.0);
  mediump float tmpvar_64;
  tmpvar_64 = clamp (dot (tmpvar_9, viewDir_58), 0.0, 1.0);
  mediump float tmpvar_65;
  tmpvar_65 = clamp (dot (_WorldSpaceLightPos0.xyz, tmpvar_61), 0.0, 1.0);
  mediump float tmpvar_66;
  tmpvar_66 = (tmpvar_60 * tmpvar_60);
  mediump float tmpvar_67;
  tmpvar_67 = (tmpvar_60 * tmpvar_60);
  mediump float tmpvar_68;
  tmpvar_68 = (tmpvar_67 * tmpvar_67);
  mediump float tmpvar_69;
  tmpvar_69 = (((tmpvar_63 * tmpvar_63) * (tmpvar_68 - 1.0)) + 1.0);
  mediump float x_70;
  x_70 = (1.0 - tmpvar_14);
  mediump float x_71;
  x_71 = (1.0 - tmpvar_64);
  mediump float tmpvar_72;
  tmpvar_72 = (0.5 + ((2.0 * tmpvar_65) * (tmpvar_65 * tmpvar_60)));
  specularTerm_59 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_14) / ((
      (tmpvar_14 * ((tmpvar_64 * (1.0 - tmpvar_66)) + tmpvar_66))
     + 
      (tmpvar_64 * ((tmpvar_14 * (1.0 - tmpvar_66)) + tmpvar_66))
    ) + 1e-05)) * (tmpvar_68 / ((3.141593 * tmpvar_69) * tmpvar_69)))
   * 0.7853982)));
  mediump float tmpvar_73;
  tmpvar_73 = max (0.0, (specularTerm_59 * tmpvar_14));
  specularTerm_59 = tmpvar_73;
  mediump float x_74;
  x_74 = (1.0 - tmpvar_65);
  mediump float x_75;
  x_75 = (1.0 - tmpvar_64);
  mediump vec3 tmpvar_76;
  tmpvar_76 = (((tmpvar_6 * 
    (tmpvar_19 + (tmpvar_18 * ((
      (1.0 + ((tmpvar_72 - 1.0) * ((x_70 * x_70) * (
        (x_70 * x_70)
       * x_70))))
     * 
      (1.0 + ((tmpvar_72 - 1.0) * ((x_71 * x_71) * (
        (x_71 * x_71)
       * x_71))))
    ) * tmpvar_14)))
  ) + (
    (tmpvar_73 * tmpvar_18)
   * 
    (tmpvar_7 + ((1.0 - tmpvar_7) * ((x_74 * x_74) * (
      (x_74 * x_74)
     * x_74))))
  )) + (tmpvar_20 * mix (tmpvar_7, vec3(
    clamp ((_Glossiness + (1.0 - tmpvar_8)), 0.0, 1.0)
  ), vec3(
    ((x_75 * x_75) * ((x_75 * x_75) * x_75))
  ))));
  mediump vec4 tmpvar_77;
  tmpvar_77.w = 1.0;
  tmpvar_77.xyz = tmpvar_76;
  c_1.w = tmpvar_77.w;
  c_1.xyz = tmpvar_76;
  c_1.xyz = c_1.xyz;
  mediump vec4 xlat_varoutput_78;
  xlat_varoutput_78.xyz = c_1.xyz;
  xlat_varoutput_78.w = 1.0;
  gl_FragData[0] = xlat_varoutput_78;
}


#endif
"
}
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_OFF" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "VERTEXLIGHT_ON" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 unity_4LightPosX0;
uniform highp vec4 unity_4LightPosY0;
uniform highp vec4 unity_4LightPosZ0;
uniform mediump vec4 unity_4LightAtten0;
uniform mediump vec4 unity_LightColor[8];
uniform mediump vec4 unity_SHAr;
uniform mediump vec4 unity_SHAg;
uniform mediump vec4 unity_SHAb;
uniform mediump vec4 unity_SHBr;
uniform mediump vec4 unity_SHBg;
uniform mediump vec4 unity_SHBb;
uniform mediump vec4 unity_SHC;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying highp vec3 xlv_TEXCOORD8;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  highp vec4 tmpvar_4;
  mediump vec4 tmpvar_5;
  mediump vec4 tmpvar_6;
  mediump vec4 tmpvar_7;
  highp vec3 tmpvar_8;
  highp vec4 tmpvar_9;
  tmpvar_9 = (_Object2World * _glesVertex);
  tmpvar_8 = tmpvar_9.xyz;
  tmpvar_4 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_10;
  texcoord_10.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_11;
  if ((_UVSec == 0.0)) {
    tmpvar_11 = tmpvar_2;
  } else {
    tmpvar_11 = tmpvar_3;
  };
  texcoord_10.zw = ((tmpvar_11 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_12;
  n_12 = (tmpvar_9.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_13;
  norm_13 = tmpvar_1;
  highp vec4 v_14;
  v_14.x = _World2Object[0].x;
  v_14.y = _World2Object[1].x;
  v_14.z = _World2Object[2].x;
  v_14.w = _World2Object[3].x;
  highp vec4 v_15;
  v_15.x = _World2Object[0].y;
  v_15.y = _World2Object[1].y;
  v_15.z = _World2Object[2].y;
  v_15.w = _World2Object[3].y;
  highp vec4 v_16;
  v_16.x = _World2Object[0].z;
  v_16.y = _World2Object[1].z;
  v_16.z = _World2Object[2].z;
  v_16.w = _World2Object[3].z;
  highp vec3 tmpvar_17;
  tmpvar_17 = normalize(((
    (v_14.xyz * norm_13.x)
   + 
    (v_15.xyz * norm_13.y)
  ) + (v_16.xyz * norm_13.z)));
  tmpvar_5.xyz = vec3(0.0, 0.0, 0.0);
  tmpvar_6.xyz = vec3(0.0, 0.0, 0.0);
  tmpvar_7.xyz = tmpvar_17;
  mediump vec3 normalWorld_18;
  normalWorld_18 = tmpvar_17;
  mediump vec4 ambientOrLightmapUV_19;
  ambientOrLightmapUV_19.w = 0.0;
  highp vec3 lightColor0_20;
  lightColor0_20 = unity_LightColor[0].xyz;
  highp vec3 lightColor1_21;
  lightColor1_21 = unity_LightColor[1].xyz;
  highp vec3 lightColor2_22;
  lightColor2_22 = unity_LightColor[2].xyz;
  highp vec3 lightColor3_23;
  lightColor3_23 = unity_LightColor[3].xyz;
  highp vec4 lightAttenSq_24;
  lightAttenSq_24 = unity_4LightAtten0;
  highp vec3 normal_25;
  normal_25 = normalWorld_18;
  highp vec3 col_26;
  highp vec4 ndotl_27;
  highp vec4 lengthSq_28;
  highp vec4 tmpvar_29;
  tmpvar_29 = (unity_4LightPosX0 - tmpvar_9.x);
  highp vec4 tmpvar_30;
  tmpvar_30 = (unity_4LightPosY0 - tmpvar_9.y);
  highp vec4 tmpvar_31;
  tmpvar_31 = (unity_4LightPosZ0 - tmpvar_9.z);
  lengthSq_28 = (tmpvar_29 * tmpvar_29);
  lengthSq_28 = (lengthSq_28 + (tmpvar_30 * tmpvar_30));
  lengthSq_28 = (lengthSq_28 + (tmpvar_31 * tmpvar_31));
  ndotl_27 = (tmpvar_29 * normal_25.x);
  ndotl_27 = (ndotl_27 + (tmpvar_30 * normal_25.y));
  ndotl_27 = (ndotl_27 + (tmpvar_31 * normal_25.z));
  highp vec4 tmpvar_32;
  tmpvar_32 = max (vec4(0.0, 0.0, 0.0, 0.0), (ndotl_27 * inversesqrt(lengthSq_28)));
  ndotl_27 = tmpvar_32;
  highp vec4 tmpvar_33;
  tmpvar_33 = (tmpvar_32 * (1.0/((1.0 + 
    (lengthSq_28 * lightAttenSq_24)
  ))));
  col_26 = (lightColor0_20 * tmpvar_33.x);
  col_26 = (col_26 + (lightColor1_21 * tmpvar_33.y));
  col_26 = (col_26 + (lightColor2_22 * tmpvar_33.z));
  col_26 = (col_26 + (lightColor3_23 * tmpvar_33.w));
  ambientOrLightmapUV_19.xyz = col_26;
  mediump vec4 tmpvar_34;
  tmpvar_34.w = 1.0;
  tmpvar_34.xyz = normalWorld_18;
  mediump vec3 res_35;
  mediump vec3 x_36;
  x_36.x = dot (unity_SHAr, tmpvar_34);
  x_36.y = dot (unity_SHAg, tmpvar_34);
  x_36.z = dot (unity_SHAb, tmpvar_34);
  mediump vec3 x1_37;
  mediump vec4 tmpvar_38;
  tmpvar_38 = (normalWorld_18.xyzz * normalWorld_18.yzzx);
  x1_37.x = dot (unity_SHBr, tmpvar_38);
  x1_37.y = dot (unity_SHBg, tmpvar_38);
  x1_37.z = dot (unity_SHBb, tmpvar_38);
  res_35 = (x_36 + (x1_37 + (unity_SHC.xyz * 
    ((normalWorld_18.x * normalWorld_18.x) - (normalWorld_18.y * normalWorld_18.y))
  )));
  res_35 = max (((1.055 * 
    pow (max (res_35, vec3(0.0, 0.0, 0.0)), vec3(0.4166667, 0.4166667, 0.4166667))
  ) - 0.055), vec3(0.0, 0.0, 0.0));
  ambientOrLightmapUV_19.xyz = (ambientOrLightmapUV_19.xyz + res_35);
  gl_Position = tmpvar_4;
  xlv_TEXCOORD0 = texcoord_10;
  xlv_TEXCOORD1 = normalize(n_12);
  xlv_TEXCOORD2 = tmpvar_5;
  xlv_TEXCOORD2_1 = tmpvar_6;
  xlv_TEXCOORD2_2 = tmpvar_7;
  xlv_TEXCOORD5 = ambientOrLightmapUV_19;
  xlv_TEXCOORD8 = tmpvar_8;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 _WorldSpaceLightPos0;
uniform lowp samplerCube unity_SpecCube0;
uniform lowp samplerCube unity_SpecCube1;
uniform highp vec4 unity_SpecCube0_BoxMax;
uniform highp vec4 unity_SpecCube0_BoxMin;
uniform highp vec4 unity_SpecCube0_ProbePosition;
uniform mediump vec4 unity_SpecCube0_HDR;
uniform highp vec4 unity_SpecCube1_BoxMax;
uniform highp vec4 unity_SpecCube1_BoxMin;
uniform highp vec4 unity_SpecCube1_ProbePosition;
uniform mediump vec4 unity_SpecCube1_HDR;
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform sampler2D _OcclusionMap;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying highp vec3 xlv_TEXCOORD8;
void main ()
{
  mediump vec4 c_1;
  mediump vec3 i_posWorld_2;
  i_posWorld_2 = xlv_TEXCOORD8;
  lowp vec4 tmpvar_3;
  tmpvar_3 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_4;
  tmpvar_4 = (_Color.xyz * tmpvar_3.xyz);
  mediump vec3 tmpvar_5;
  mediump vec3 tmpvar_6;
  tmpvar_6 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_4, vec3(_Metallic));
  mediump float tmpvar_7;
  tmpvar_7 = (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w));
  tmpvar_5 = (tmpvar_4 * tmpvar_7);
  mediump vec3 tmpvar_8;
  tmpvar_8 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_9;
  tmpvar_9 = _LightColor0.xyz;
  mediump float tmpvar_10;
  lowp vec4 tmpvar_11;
  tmpvar_11 = texture2D (_OcclusionMap, xlv_TEXCOORD0.xy);
  tmpvar_10 = tmpvar_11.y;
  mediump float tmpvar_12;
  tmpvar_12 = clamp (dot (tmpvar_8, _WorldSpaceLightPos0.xyz), 0.0, 1.0);
  highp vec3 tmpvar_13;
  highp vec4 tmpvar_14;
  highp vec4 tmpvar_15;
  tmpvar_13 = i_posWorld_2;
  tmpvar_14 = unity_SpecCube0_HDR;
  tmpvar_15 = unity_SpecCube1_HDR;
  mediump vec3 tmpvar_16;
  mediump vec3 tmpvar_17;
  tmpvar_16 = (xlv_TEXCOORD5.xyz * tmpvar_10);
  tmpvar_17 = vec3(0.0, 0.0, 0.0);
  mediump float tmpvar_18;
  mediump vec3 tmpvar_19;
  tmpvar_18 = (1.0 - _Glossiness);
  tmpvar_19 = (xlv_TEXCOORD1 - (2.0 * (
    dot (tmpvar_8, xlv_TEXCOORD1)
   * tmpvar_8)));
  mediump vec3 originalReflUVW_20;
  mediump vec3 specular_21;
  originalReflUVW_20 = tmpvar_19;
  mediump vec3 worldRefl_22;
  worldRefl_22 = tmpvar_19;
  highp vec3 worldPos_23;
  worldPos_23 = tmpvar_13;
  if ((unity_SpecCube0_ProbePosition.w > 0.0)) {
    mediump vec3 rbmin_24;
    mediump vec3 rbmax_25;
    mediump vec3 tmpvar_26;
    tmpvar_26 = normalize(tmpvar_19);
    highp vec3 tmpvar_27;
    tmpvar_27 = ((unity_SpecCube0_BoxMax.xyz - tmpvar_13) / tmpvar_26);
    rbmax_25 = tmpvar_27;
    highp vec3 tmpvar_28;
    tmpvar_28 = ((unity_SpecCube0_BoxMin.xyz - tmpvar_13) / tmpvar_26);
    rbmin_24 = tmpvar_28;
    bvec3 tmpvar_29;
    tmpvar_29 = greaterThan (tmpvar_26, vec3(0.0, 0.0, 0.0));
    mediump float tmpvar_30;
    if (tmpvar_29.x) {
      tmpvar_30 = rbmax_25.x;
    } else {
      tmpvar_30 = rbmin_24.x;
    };
    mediump float tmpvar_31;
    if (tmpvar_29.y) {
      tmpvar_31 = rbmax_25.y;
    } else {
      tmpvar_31 = rbmin_24.y;
    };
    mediump float tmpvar_32;
    if (tmpvar_29.z) {
      tmpvar_32 = rbmax_25.z;
    } else {
      tmpvar_32 = rbmin_24.z;
    };
    worldPos_23 = (tmpvar_13 - unity_SpecCube0_ProbePosition.xyz);
    worldRefl_22 = (worldPos_23 + (tmpvar_26 * min (
      min (tmpvar_30, tmpvar_31)
    , tmpvar_32)));
  };
  tmpvar_19 = worldRefl_22;
  mediump vec4 hdr_33;
  hdr_33 = tmpvar_14;
  mediump vec4 tmpvar_34;
  tmpvar_34.xyz = worldRefl_22;
  tmpvar_34.w = ((tmpvar_18 * (1.7 - 
    (0.7 * tmpvar_18)
  )) * 6.0);
  lowp vec4 tmpvar_35;
  tmpvar_35 = textureCube (unity_SpecCube0, worldRefl_22, tmpvar_34.w);
  mediump vec4 tmpvar_36;
  tmpvar_36 = tmpvar_35;
  mediump vec3 tmpvar_37;
  tmpvar_37 = ((tmpvar_36.w * hdr_33.x) * tmpvar_36.xyz);
  if ((unity_SpecCube0_BoxMin.w < 0.99999)) {
    mediump vec3 worldRefl_38;
    worldRefl_38 = originalReflUVW_20;
    highp vec3 worldPos_39;
    worldPos_39 = tmpvar_13;
    if ((unity_SpecCube1_ProbePosition.w > 0.0)) {
      mediump vec3 rbmin_40;
      mediump vec3 rbmax_41;
      mediump vec3 tmpvar_42;
      tmpvar_42 = normalize(originalReflUVW_20);
      highp vec3 tmpvar_43;
      tmpvar_43 = ((unity_SpecCube1_BoxMax.xyz - tmpvar_13) / tmpvar_42);
      rbmax_41 = tmpvar_43;
      highp vec3 tmpvar_44;
      tmpvar_44 = ((unity_SpecCube1_BoxMin.xyz - tmpvar_13) / tmpvar_42);
      rbmin_40 = tmpvar_44;
      bvec3 tmpvar_45;
      tmpvar_45 = greaterThan (tmpvar_42, vec3(0.0, 0.0, 0.0));
      mediump float tmpvar_46;
      if (tmpvar_45.x) {
        tmpvar_46 = rbmax_41.x;
      } else {
        tmpvar_46 = rbmin_40.x;
      };
      mediump float tmpvar_47;
      if (tmpvar_45.y) {
        tmpvar_47 = rbmax_41.y;
      } else {
        tmpvar_47 = rbmin_40.y;
      };
      mediump float tmpvar_48;
      if (tmpvar_45.z) {
        tmpvar_48 = rbmax_41.z;
      } else {
        tmpvar_48 = rbmin_40.z;
      };
      worldPos_39 = (tmpvar_13 - unity_SpecCube1_ProbePosition.xyz);
      worldRefl_38 = (worldPos_39 + (tmpvar_42 * min (
        min (tmpvar_46, tmpvar_47)
      , tmpvar_48)));
    };
    tmpvar_19 = worldRefl_38;
    mediump vec4 hdr_49;
    hdr_49 = tmpvar_15;
    mediump vec4 tmpvar_50;
    tmpvar_50.xyz = worldRefl_38;
    tmpvar_50.w = ((tmpvar_18 * (1.7 - 
      (0.7 * tmpvar_18)
    )) * 6.0);
    lowp vec4 tmpvar_51;
    tmpvar_51 = textureCube (unity_SpecCube1, worldRefl_38, tmpvar_50.w);
    mediump vec4 tmpvar_52;
    tmpvar_52 = tmpvar_51;
    mediump vec3 tmpvar_53;
    tmpvar_53 = ((tmpvar_52.w * hdr_49.x) * tmpvar_52.xyz);
    highp vec3 tmpvar_54;
    tmpvar_54 = mix (tmpvar_53, tmpvar_37, unity_SpecCube0_BoxMin.www);
    specular_21 = tmpvar_54;
  } else {
    specular_21 = tmpvar_37;
  };
  tmpvar_17 = (specular_21 * tmpvar_10);
  mediump vec3 viewDir_55;
  viewDir_55 = -(xlv_TEXCOORD1);
  mediump float specularTerm_56;
  mediump float tmpvar_57;
  tmpvar_57 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_58;
  mediump vec3 inVec_59;
  inVec_59 = (_WorldSpaceLightPos0.xyz + viewDir_55);
  tmpvar_58 = (inVec_59 * inversesqrt(max (0.001, 
    dot (inVec_59, inVec_59)
  )));
  mediump float tmpvar_60;
  tmpvar_60 = clamp (dot (tmpvar_8, tmpvar_58), 0.0, 1.0);
  mediump float tmpvar_61;
  tmpvar_61 = clamp (dot (tmpvar_8, viewDir_55), 0.0, 1.0);
  mediump float tmpvar_62;
  tmpvar_62 = clamp (dot (_WorldSpaceLightPos0.xyz, tmpvar_58), 0.0, 1.0);
  mediump float tmpvar_63;
  tmpvar_63 = (tmpvar_57 * tmpvar_57);
  mediump float tmpvar_64;
  tmpvar_64 = (tmpvar_57 * tmpvar_57);
  mediump float tmpvar_65;
  tmpvar_65 = (tmpvar_64 * tmpvar_64);
  mediump float tmpvar_66;
  tmpvar_66 = (((tmpvar_60 * tmpvar_60) * (tmpvar_65 - 1.0)) + 1.0);
  mediump float x_67;
  x_67 = (1.0 - tmpvar_12);
  mediump float x_68;
  x_68 = (1.0 - tmpvar_61);
  mediump float tmpvar_69;
  tmpvar_69 = (0.5 + ((2.0 * tmpvar_62) * (tmpvar_62 * tmpvar_57)));
  specularTerm_56 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_12) / ((
      (tmpvar_12 * ((tmpvar_61 * (1.0 - tmpvar_63)) + tmpvar_63))
     + 
      (tmpvar_61 * ((tmpvar_12 * (1.0 - tmpvar_63)) + tmpvar_63))
    ) + 1e-05)) * (tmpvar_65 / ((3.141593 * tmpvar_66) * tmpvar_66)))
   * 0.7853982)));
  mediump float tmpvar_70;
  tmpvar_70 = max (0.0, (specularTerm_56 * tmpvar_12));
  specularTerm_56 = tmpvar_70;
  mediump float x_71;
  x_71 = (1.0 - tmpvar_62);
  mediump float x_72;
  x_72 = (1.0 - tmpvar_61);
  mediump vec3 tmpvar_73;
  tmpvar_73 = (((tmpvar_5 * 
    (tmpvar_16 + (tmpvar_9 * ((
      (1.0 + ((tmpvar_69 - 1.0) * ((x_67 * x_67) * (
        (x_67 * x_67)
       * x_67))))
     * 
      (1.0 + ((tmpvar_69 - 1.0) * ((x_68 * x_68) * (
        (x_68 * x_68)
       * x_68))))
    ) * tmpvar_12)))
  ) + (
    (tmpvar_70 * tmpvar_9)
   * 
    (tmpvar_6 + ((1.0 - tmpvar_6) * ((x_71 * x_71) * (
      (x_71 * x_71)
     * x_71))))
  )) + (tmpvar_17 * mix (tmpvar_6, vec3(
    clamp ((_Glossiness + (1.0 - tmpvar_7)), 0.0, 1.0)
  ), vec3(
    ((x_72 * x_72) * ((x_72 * x_72) * x_72))
  ))));
  mediump vec4 tmpvar_74;
  tmpvar_74.w = 1.0;
  tmpvar_74.xyz = tmpvar_73;
  c_1.w = tmpvar_74.w;
  c_1.xyz = tmpvar_73;
  c_1.xyz = c_1.xyz;
  mediump vec4 xlat_varoutput_75;
  xlat_varoutput_75.xyz = c_1.xyz;
  xlat_varoutput_75.w = 1.0;
  gl_FragData[0] = xlat_varoutput_75;
}


#endif
"
}
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "VERTEXLIGHT_ON" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _ProjectionParams;
uniform highp vec4 unity_4LightPosX0;
uniform highp vec4 unity_4LightPosY0;
uniform highp vec4 unity_4LightPosZ0;
uniform mediump vec4 unity_4LightAtten0;
uniform mediump vec4 unity_LightColor[8];
uniform mediump vec4 unity_SHAr;
uniform mediump vec4 unity_SHAg;
uniform mediump vec4 unity_SHAb;
uniform mediump vec4 unity_SHBr;
uniform mediump vec4 unity_SHBg;
uniform mediump vec4 unity_SHBb;
uniform mediump vec4 unity_SHC;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
varying highp vec3 xlv_TEXCOORD8;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  highp vec4 tmpvar_4;
  mediump vec4 tmpvar_5;
  mediump vec4 tmpvar_6;
  mediump vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  highp vec3 tmpvar_9;
  highp vec4 tmpvar_10;
  tmpvar_10 = (_Object2World * _glesVertex);
  tmpvar_9 = tmpvar_10.xyz;
  tmpvar_4 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_11;
  texcoord_11.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_12;
  if ((_UVSec == 0.0)) {
    tmpvar_12 = tmpvar_2;
  } else {
    tmpvar_12 = tmpvar_3;
  };
  texcoord_11.zw = ((tmpvar_12 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_13;
  n_13 = (tmpvar_10.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_14;
  norm_14 = tmpvar_1;
  highp vec4 v_15;
  v_15.x = _World2Object[0].x;
  v_15.y = _World2Object[1].x;
  v_15.z = _World2Object[2].x;
  v_15.w = _World2Object[3].x;
  highp vec4 v_16;
  v_16.x = _World2Object[0].y;
  v_16.y = _World2Object[1].y;
  v_16.z = _World2Object[2].y;
  v_16.w = _World2Object[3].y;
  highp vec4 v_17;
  v_17.x = _World2Object[0].z;
  v_17.y = _World2Object[1].z;
  v_17.z = _World2Object[2].z;
  v_17.w = _World2Object[3].z;
  highp vec3 tmpvar_18;
  tmpvar_18 = normalize(((
    (v_15.xyz * norm_14.x)
   + 
    (v_16.xyz * norm_14.y)
  ) + (v_17.xyz * norm_14.z)));
  tmpvar_5.xyz = vec3(0.0, 0.0, 0.0);
  tmpvar_6.xyz = vec3(0.0, 0.0, 0.0);
  tmpvar_7.xyz = tmpvar_18;
  highp vec4 o_19;
  highp vec4 tmpvar_20;
  tmpvar_20 = (tmpvar_4 * 0.5);
  highp vec2 tmpvar_21;
  tmpvar_21.x = tmpvar_20.x;
  tmpvar_21.y = (tmpvar_20.y * _ProjectionParams.x);
  o_19.xy = (tmpvar_21 + tmpvar_20.w);
  o_19.zw = tmpvar_4.zw;
  tmpvar_8 = o_19;
  mediump vec3 normalWorld_22;
  normalWorld_22 = tmpvar_18;
  mediump vec4 ambientOrLightmapUV_23;
  ambientOrLightmapUV_23.w = 0.0;
  highp vec3 lightColor0_24;
  lightColor0_24 = unity_LightColor[0].xyz;
  highp vec3 lightColor1_25;
  lightColor1_25 = unity_LightColor[1].xyz;
  highp vec3 lightColor2_26;
  lightColor2_26 = unity_LightColor[2].xyz;
  highp vec3 lightColor3_27;
  lightColor3_27 = unity_LightColor[3].xyz;
  highp vec4 lightAttenSq_28;
  lightAttenSq_28 = unity_4LightAtten0;
  highp vec3 normal_29;
  normal_29 = normalWorld_22;
  highp vec3 col_30;
  highp vec4 ndotl_31;
  highp vec4 lengthSq_32;
  highp vec4 tmpvar_33;
  tmpvar_33 = (unity_4LightPosX0 - tmpvar_10.x);
  highp vec4 tmpvar_34;
  tmpvar_34 = (unity_4LightPosY0 - tmpvar_10.y);
  highp vec4 tmpvar_35;
  tmpvar_35 = (unity_4LightPosZ0 - tmpvar_10.z);
  lengthSq_32 = (tmpvar_33 * tmpvar_33);
  lengthSq_32 = (lengthSq_32 + (tmpvar_34 * tmpvar_34));
  lengthSq_32 = (lengthSq_32 + (tmpvar_35 * tmpvar_35));
  ndotl_31 = (tmpvar_33 * normal_29.x);
  ndotl_31 = (ndotl_31 + (tmpvar_34 * normal_29.y));
  ndotl_31 = (ndotl_31 + (tmpvar_35 * normal_29.z));
  highp vec4 tmpvar_36;
  tmpvar_36 = max (vec4(0.0, 0.0, 0.0, 0.0), (ndotl_31 * inversesqrt(lengthSq_32)));
  ndotl_31 = tmpvar_36;
  highp vec4 tmpvar_37;
  tmpvar_37 = (tmpvar_36 * (1.0/((1.0 + 
    (lengthSq_32 * lightAttenSq_28)
  ))));
  col_30 = (lightColor0_24 * tmpvar_37.x);
  col_30 = (col_30 + (lightColor1_25 * tmpvar_37.y));
  col_30 = (col_30 + (lightColor2_26 * tmpvar_37.z));
  col_30 = (col_30 + (lightColor3_27 * tmpvar_37.w));
  ambientOrLightmapUV_23.xyz = col_30;
  mediump vec4 tmpvar_38;
  tmpvar_38.w = 1.0;
  tmpvar_38.xyz = normalWorld_22;
  mediump vec3 res_39;
  mediump vec3 x_40;
  x_40.x = dot (unity_SHAr, tmpvar_38);
  x_40.y = dot (unity_SHAg, tmpvar_38);
  x_40.z = dot (unity_SHAb, tmpvar_38);
  mediump vec3 x1_41;
  mediump vec4 tmpvar_42;
  tmpvar_42 = (normalWorld_22.xyzz * normalWorld_22.yzzx);
  x1_41.x = dot (unity_SHBr, tmpvar_42);
  x1_41.y = dot (unity_SHBg, tmpvar_42);
  x1_41.z = dot (unity_SHBb, tmpvar_42);
  res_39 = (x_40 + (x1_41 + (unity_SHC.xyz * 
    ((normalWorld_22.x * normalWorld_22.x) - (normalWorld_22.y * normalWorld_22.y))
  )));
  res_39 = max (((1.055 * 
    pow (max (res_39, vec3(0.0, 0.0, 0.0)), vec3(0.4166667, 0.4166667, 0.4166667))
  ) - 0.055), vec3(0.0, 0.0, 0.0));
  ambientOrLightmapUV_23.xyz = (ambientOrLightmapUV_23.xyz + res_39);
  gl_Position = tmpvar_4;
  xlv_TEXCOORD0 = texcoord_11;
  xlv_TEXCOORD1 = normalize(n_13);
  xlv_TEXCOORD2 = tmpvar_5;
  xlv_TEXCOORD2_1 = tmpvar_6;
  xlv_TEXCOORD2_2 = tmpvar_7;
  xlv_TEXCOORD5 = ambientOrLightmapUV_23;
  xlv_TEXCOORD6 = tmpvar_8;
  xlv_TEXCOORD8 = tmpvar_9;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 _WorldSpaceLightPos0;
uniform lowp samplerCube unity_SpecCube0;
uniform lowp samplerCube unity_SpecCube1;
uniform highp vec4 unity_SpecCube0_BoxMax;
uniform highp vec4 unity_SpecCube0_BoxMin;
uniform highp vec4 unity_SpecCube0_ProbePosition;
uniform mediump vec4 unity_SpecCube0_HDR;
uniform highp vec4 unity_SpecCube1_BoxMax;
uniform highp vec4 unity_SpecCube1_BoxMin;
uniform highp vec4 unity_SpecCube1_ProbePosition;
uniform mediump vec4 unity_SpecCube1_HDR;
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform sampler2D _OcclusionMap;
uniform sampler2D _ShadowMapTexture;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
varying highp vec3 xlv_TEXCOORD8;
void main ()
{
  mediump vec4 c_1;
  mediump float atten_2;
  mediump vec3 i_posWorld_3;
  i_posWorld_3 = xlv_TEXCOORD8;
  lowp vec4 tmpvar_4;
  tmpvar_4 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_5;
  tmpvar_5 = (_Color.xyz * tmpvar_4.xyz);
  mediump vec3 tmpvar_6;
  mediump vec3 tmpvar_7;
  tmpvar_7 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_5, vec3(_Metallic));
  mediump float tmpvar_8;
  tmpvar_8 = (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w));
  tmpvar_6 = (tmpvar_5 * tmpvar_8);
  mediump vec3 tmpvar_9;
  tmpvar_9 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_10;
  tmpvar_10 = _LightColor0.xyz;
  lowp float tmpvar_11;
  tmpvar_11 = texture2DProj (_ShadowMapTexture, xlv_TEXCOORD6).x;
  atten_2 = tmpvar_11;
  mediump float tmpvar_12;
  lowp vec4 tmpvar_13;
  tmpvar_13 = texture2D (_OcclusionMap, xlv_TEXCOORD0.xy);
  tmpvar_12 = tmpvar_13.y;
  mediump float tmpvar_14;
  tmpvar_14 = clamp (dot (tmpvar_9, _WorldSpaceLightPos0.xyz), 0.0, 1.0);
  highp vec3 tmpvar_15;
  highp vec4 tmpvar_16;
  highp vec4 tmpvar_17;
  tmpvar_15 = i_posWorld_3;
  tmpvar_16 = unity_SpecCube0_HDR;
  tmpvar_17 = unity_SpecCube1_HDR;
  mediump vec3 tmpvar_18;
  mediump vec3 tmpvar_19;
  mediump vec3 tmpvar_20;
  tmpvar_18 = (tmpvar_10 * atten_2);
  tmpvar_19 = (xlv_TEXCOORD5.xyz * tmpvar_12);
  tmpvar_20 = vec3(0.0, 0.0, 0.0);
  mediump float tmpvar_21;
  mediump vec3 tmpvar_22;
  tmpvar_21 = (1.0 - _Glossiness);
  tmpvar_22 = (xlv_TEXCOORD1 - (2.0 * (
    dot (tmpvar_9, xlv_TEXCOORD1)
   * tmpvar_9)));
  mediump vec3 originalReflUVW_23;
  mediump vec3 specular_24;
  originalReflUVW_23 = tmpvar_22;
  mediump vec3 worldRefl_25;
  worldRefl_25 = tmpvar_22;
  highp vec3 worldPos_26;
  worldPos_26 = tmpvar_15;
  if ((unity_SpecCube0_ProbePosition.w > 0.0)) {
    mediump vec3 rbmin_27;
    mediump vec3 rbmax_28;
    mediump vec3 tmpvar_29;
    tmpvar_29 = normalize(tmpvar_22);
    highp vec3 tmpvar_30;
    tmpvar_30 = ((unity_SpecCube0_BoxMax.xyz - tmpvar_15) / tmpvar_29);
    rbmax_28 = tmpvar_30;
    highp vec3 tmpvar_31;
    tmpvar_31 = ((unity_SpecCube0_BoxMin.xyz - tmpvar_15) / tmpvar_29);
    rbmin_27 = tmpvar_31;
    bvec3 tmpvar_32;
    tmpvar_32 = greaterThan (tmpvar_29, vec3(0.0, 0.0, 0.0));
    mediump float tmpvar_33;
    if (tmpvar_32.x) {
      tmpvar_33 = rbmax_28.x;
    } else {
      tmpvar_33 = rbmin_27.x;
    };
    mediump float tmpvar_34;
    if (tmpvar_32.y) {
      tmpvar_34 = rbmax_28.y;
    } else {
      tmpvar_34 = rbmin_27.y;
    };
    mediump float tmpvar_35;
    if (tmpvar_32.z) {
      tmpvar_35 = rbmax_28.z;
    } else {
      tmpvar_35 = rbmin_27.z;
    };
    worldPos_26 = (tmpvar_15 - unity_SpecCube0_ProbePosition.xyz);
    worldRefl_25 = (worldPos_26 + (tmpvar_29 * min (
      min (tmpvar_33, tmpvar_34)
    , tmpvar_35)));
  };
  tmpvar_22 = worldRefl_25;
  mediump vec4 hdr_36;
  hdr_36 = tmpvar_16;
  mediump vec4 tmpvar_37;
  tmpvar_37.xyz = worldRefl_25;
  tmpvar_37.w = ((tmpvar_21 * (1.7 - 
    (0.7 * tmpvar_21)
  )) * 6.0);
  lowp vec4 tmpvar_38;
  tmpvar_38 = textureCube (unity_SpecCube0, worldRefl_25, tmpvar_37.w);
  mediump vec4 tmpvar_39;
  tmpvar_39 = tmpvar_38;
  mediump vec3 tmpvar_40;
  tmpvar_40 = ((tmpvar_39.w * hdr_36.x) * tmpvar_39.xyz);
  if ((unity_SpecCube0_BoxMin.w < 0.99999)) {
    mediump vec3 worldRefl_41;
    worldRefl_41 = originalReflUVW_23;
    highp vec3 worldPos_42;
    worldPos_42 = tmpvar_15;
    if ((unity_SpecCube1_ProbePosition.w > 0.0)) {
      mediump vec3 rbmin_43;
      mediump vec3 rbmax_44;
      mediump vec3 tmpvar_45;
      tmpvar_45 = normalize(originalReflUVW_23);
      highp vec3 tmpvar_46;
      tmpvar_46 = ((unity_SpecCube1_BoxMax.xyz - tmpvar_15) / tmpvar_45);
      rbmax_44 = tmpvar_46;
      highp vec3 tmpvar_47;
      tmpvar_47 = ((unity_SpecCube1_BoxMin.xyz - tmpvar_15) / tmpvar_45);
      rbmin_43 = tmpvar_47;
      bvec3 tmpvar_48;
      tmpvar_48 = greaterThan (tmpvar_45, vec3(0.0, 0.0, 0.0));
      mediump float tmpvar_49;
      if (tmpvar_48.x) {
        tmpvar_49 = rbmax_44.x;
      } else {
        tmpvar_49 = rbmin_43.x;
      };
      mediump float tmpvar_50;
      if (tmpvar_48.y) {
        tmpvar_50 = rbmax_44.y;
      } else {
        tmpvar_50 = rbmin_43.y;
      };
      mediump float tmpvar_51;
      if (tmpvar_48.z) {
        tmpvar_51 = rbmax_44.z;
      } else {
        tmpvar_51 = rbmin_43.z;
      };
      worldPos_42 = (tmpvar_15 - unity_SpecCube1_ProbePosition.xyz);
      worldRefl_41 = (worldPos_42 + (tmpvar_45 * min (
        min (tmpvar_49, tmpvar_50)
      , tmpvar_51)));
    };
    tmpvar_22 = worldRefl_41;
    mediump vec4 hdr_52;
    hdr_52 = tmpvar_17;
    mediump vec4 tmpvar_53;
    tmpvar_53.xyz = worldRefl_41;
    tmpvar_53.w = ((tmpvar_21 * (1.7 - 
      (0.7 * tmpvar_21)
    )) * 6.0);
    lowp vec4 tmpvar_54;
    tmpvar_54 = textureCube (unity_SpecCube1, worldRefl_41, tmpvar_53.w);
    mediump vec4 tmpvar_55;
    tmpvar_55 = tmpvar_54;
    mediump vec3 tmpvar_56;
    tmpvar_56 = ((tmpvar_55.w * hdr_52.x) * tmpvar_55.xyz);
    highp vec3 tmpvar_57;
    tmpvar_57 = mix (tmpvar_56, tmpvar_40, unity_SpecCube0_BoxMin.www);
    specular_24 = tmpvar_57;
  } else {
    specular_24 = tmpvar_40;
  };
  tmpvar_20 = (specular_24 * tmpvar_12);
  mediump vec3 viewDir_58;
  viewDir_58 = -(xlv_TEXCOORD1);
  mediump float specularTerm_59;
  mediump float tmpvar_60;
  tmpvar_60 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_61;
  mediump vec3 inVec_62;
  inVec_62 = (_WorldSpaceLightPos0.xyz + viewDir_58);
  tmpvar_61 = (inVec_62 * inversesqrt(max (0.001, 
    dot (inVec_62, inVec_62)
  )));
  mediump float tmpvar_63;
  tmpvar_63 = clamp (dot (tmpvar_9, tmpvar_61), 0.0, 1.0);
  mediump float tmpvar_64;
  tmpvar_64 = clamp (dot (tmpvar_9, viewDir_58), 0.0, 1.0);
  mediump float tmpvar_65;
  tmpvar_65 = clamp (dot (_WorldSpaceLightPos0.xyz, tmpvar_61), 0.0, 1.0);
  mediump float tmpvar_66;
  tmpvar_66 = (tmpvar_60 * tmpvar_60);
  mediump float tmpvar_67;
  tmpvar_67 = (tmpvar_60 * tmpvar_60);
  mediump float tmpvar_68;
  tmpvar_68 = (tmpvar_67 * tmpvar_67);
  mediump float tmpvar_69;
  tmpvar_69 = (((tmpvar_63 * tmpvar_63) * (tmpvar_68 - 1.0)) + 1.0);
  mediump float x_70;
  x_70 = (1.0 - tmpvar_14);
  mediump float x_71;
  x_71 = (1.0 - tmpvar_64);
  mediump float tmpvar_72;
  tmpvar_72 = (0.5 + ((2.0 * tmpvar_65) * (tmpvar_65 * tmpvar_60)));
  specularTerm_59 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_14) / ((
      (tmpvar_14 * ((tmpvar_64 * (1.0 - tmpvar_66)) + tmpvar_66))
     + 
      (tmpvar_64 * ((tmpvar_14 * (1.0 - tmpvar_66)) + tmpvar_66))
    ) + 1e-05)) * (tmpvar_68 / ((3.141593 * tmpvar_69) * tmpvar_69)))
   * 0.7853982)));
  mediump float tmpvar_73;
  tmpvar_73 = max (0.0, (specularTerm_59 * tmpvar_14));
  specularTerm_59 = tmpvar_73;
  mediump float x_74;
  x_74 = (1.0 - tmpvar_65);
  mediump float x_75;
  x_75 = (1.0 - tmpvar_64);
  mediump vec3 tmpvar_76;
  tmpvar_76 = (((tmpvar_6 * 
    (tmpvar_19 + (tmpvar_18 * ((
      (1.0 + ((tmpvar_72 - 1.0) * ((x_70 * x_70) * (
        (x_70 * x_70)
       * x_70))))
     * 
      (1.0 + ((tmpvar_72 - 1.0) * ((x_71 * x_71) * (
        (x_71 * x_71)
       * x_71))))
    ) * tmpvar_14)))
  ) + (
    (tmpvar_73 * tmpvar_18)
   * 
    (tmpvar_7 + ((1.0 - tmpvar_7) * ((x_74 * x_74) * (
      (x_74 * x_74)
     * x_74))))
  )) + (tmpvar_20 * mix (tmpvar_7, vec3(
    clamp ((_Glossiness + (1.0 - tmpvar_8)), 0.0, 1.0)
  ), vec3(
    ((x_75 * x_75) * ((x_75 * x_75) * x_75))
  ))));
  mediump vec4 tmpvar_77;
  tmpvar_77.w = 1.0;
  tmpvar_77.xyz = tmpvar_76;
  c_1.w = tmpvar_77.w;
  c_1.xyz = tmpvar_76;
  c_1.xyz = c_1.xyz;
  mediump vec4 xlat_varoutput_78;
  xlat_varoutput_78.xyz = c_1.xyz;
  xlat_varoutput_78.w = 1.0;
  gl_FragData[0] = xlat_varoutput_78;
}


#endif
"
}
}
Program "fp" {
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_OFF" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" }
""
}
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" }
""
}
}
 }
 Pass {
  Name "FORWARD_DELTA"
  Tags { "LIGHTMODE"="ForwardAdd" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" }
  ZWrite Off
  Blend [_SrcBlend] One
  GpuProgramID 443686
Program "vp" {
SubProgram "gles " {
Keywords { "POINT" "SHADOWS_OFF" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _WorldSpaceLightPos0;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
uniform mediump mat4 _LightMatrix0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec3 xlv_TEXCOORD5;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp vec3 lightDir_5;
  highp mat3 tangentToWorld_6;
  highp vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  mediump vec4 tmpvar_10;
  highp vec4 tmpvar_11;
  tmpvar_11 = (_Object2World * _glesVertex);
  tmpvar_7 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_12;
  texcoord_12.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_13;
  if ((_UVSec == 0.0)) {
    tmpvar_13 = tmpvar_2;
  } else {
    tmpvar_13 = tmpvar_3;
  };
  texcoord_12.zw = ((tmpvar_13 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_14;
  n_14 = (tmpvar_11.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_15;
  norm_15 = tmpvar_1;
  highp vec4 v_16;
  v_16.x = _World2Object[0].x;
  v_16.y = _World2Object[1].x;
  v_16.z = _World2Object[2].x;
  v_16.w = _World2Object[3].x;
  highp vec4 v_17;
  v_17.x = _World2Object[0].y;
  v_17.y = _World2Object[1].y;
  v_17.z = _World2Object[2].y;
  v_17.w = _World2Object[3].y;
  highp vec4 v_18;
  v_18.x = _World2Object[0].z;
  v_18.y = _World2Object[1].z;
  v_18.z = _World2Object[2].z;
  v_18.w = _World2Object[3].z;
  highp vec3 tmpvar_19;
  tmpvar_19 = normalize(((
    (v_16.xyz * norm_15.x)
   + 
    (v_17.xyz * norm_15.y)
  ) + (v_18.xyz * norm_15.z)));
  highp vec3 dir_20;
  dir_20 = tmpvar_4.xyz;
  highp mat3 tmpvar_21;
  tmpvar_21[0] = _Object2World[0].xyz;
  tmpvar_21[1] = _Object2World[1].xyz;
  tmpvar_21[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_22;
  tmpvar_22.xyz = normalize((tmpvar_21 * dir_20));
  tmpvar_22.w = tmpvar_4.w;
  mediump vec3 normal_23;
  normal_23 = tmpvar_19;
  mediump vec3 tangent_24;
  tangent_24 = tmpvar_22.xyz;
  mediump float tangentSign_25;
  tangentSign_25 = tmpvar_22.w;
  mediump float xlat_varsign_26;
  highp float tmpvar_27;
  tmpvar_27 = (tangentSign_25 * unity_WorldTransformParams.w);
  xlat_varsign_26 = tmpvar_27;
  mediump vec3 tmpvar_28;
  tmpvar_28 = (((normal_23.yzx * tangent_24.zxy) - (normal_23.zxy * tangent_24.yzx)) * xlat_varsign_26);
  mediump mat3 tmpvar_29;
  tmpvar_29[0].x = tangent_24.x;
  tmpvar_29[0].y = tmpvar_28.x;
  tmpvar_29[0].z = normal_23.x;
  tmpvar_29[1].x = tangent_24.y;
  tmpvar_29[1].y = tmpvar_28.y;
  tmpvar_29[1].z = normal_23.y;
  tmpvar_29[2].x = tangent_24.z;
  tmpvar_29[2].y = tmpvar_28.z;
  tmpvar_29[2].z = normal_23.z;
  tangentToWorld_6 = tmpvar_29;
  highp vec3 v_30;
  v_30.x = tangentToWorld_6[0].x;
  v_30.y = tangentToWorld_6[1].x;
  v_30.z = tangentToWorld_6[2].x;
  tmpvar_8.xyz = v_30;
  highp vec3 v_31;
  v_31.x = tangentToWorld_6[0].y;
  v_31.y = tangentToWorld_6[1].y;
  v_31.z = tangentToWorld_6[2].y;
  tmpvar_9.xyz = v_31;
  highp vec3 v_32;
  v_32.x = tangentToWorld_6[0].z;
  v_32.y = tangentToWorld_6[1].z;
  v_32.z = tangentToWorld_6[2].z;
  tmpvar_10.xyz = v_32;
  highp vec3 tmpvar_33;
  tmpvar_33 = (_WorldSpaceLightPos0.xyz - (tmpvar_11.xyz * _WorldSpaceLightPos0.w));
  mediump vec3 n_34;
  n_34 = tmpvar_33;
  mediump vec3 tmpvar_35;
  tmpvar_35 = normalize(n_34);
  lightDir_5 = tmpvar_35;
  tmpvar_8.w = lightDir_5.x;
  tmpvar_9.w = lightDir_5.y;
  tmpvar_10.w = lightDir_5.z;
  gl_Position = tmpvar_7;
  xlv_TEXCOORD0 = texcoord_12;
  xlv_TEXCOORD1 = normalize(n_14);
  xlv_TEXCOORD2 = tmpvar_8;
  xlv_TEXCOORD2_1 = tmpvar_9;
  xlv_TEXCOORD2_2 = tmpvar_10;
  xlv_TEXCOORD5 = (_LightMatrix0 * (_Object2World * _glesVertex)).xyz;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform sampler2D _LightTexture0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec3 xlv_TEXCOORD5;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  tmpvar_3 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  mediump vec3 tmpvar_4;
  tmpvar_4 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_5;
  tmpvar_5.x = xlv_TEXCOORD2.w;
  tmpvar_5.y = xlv_TEXCOORD2_1.w;
  tmpvar_5.z = xlv_TEXCOORD2_2.w;
  highp float tmpvar_6;
  tmpvar_6 = dot (xlv_TEXCOORD5, xlv_TEXCOORD5);
  lowp vec4 tmpvar_7;
  tmpvar_7 = texture2D (_LightTexture0, vec2(tmpvar_6));
  mediump float atten_8;
  atten_8 = tmpvar_7.w;
  mediump vec3 tmpvar_9;
  tmpvar_9 = _LightColor0.xyz;
  mediump float tmpvar_10;
  tmpvar_10 = clamp (dot (tmpvar_4, tmpvar_5), 0.0, 1.0);
  tmpvar_9 = (tmpvar_9 * atten_8);
  mediump vec3 viewDir_11;
  viewDir_11 = -(xlv_TEXCOORD1);
  mediump float specularTerm_12;
  mediump float tmpvar_13;
  tmpvar_13 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_14;
  mediump vec3 inVec_15;
  inVec_15 = (tmpvar_5 + viewDir_11);
  tmpvar_14 = (inVec_15 * inversesqrt(max (0.001, 
    dot (inVec_15, inVec_15)
  )));
  mediump float tmpvar_16;
  tmpvar_16 = clamp (dot (tmpvar_4, tmpvar_14), 0.0, 1.0);
  mediump float tmpvar_17;
  tmpvar_17 = clamp (dot (tmpvar_4, viewDir_11), 0.0, 1.0);
  mediump float tmpvar_18;
  tmpvar_18 = clamp (dot (tmpvar_5, tmpvar_14), 0.0, 1.0);
  mediump float tmpvar_19;
  tmpvar_19 = (tmpvar_13 * tmpvar_13);
  mediump float tmpvar_20;
  tmpvar_20 = (tmpvar_13 * tmpvar_13);
  mediump float tmpvar_21;
  tmpvar_21 = (tmpvar_20 * tmpvar_20);
  mediump float tmpvar_22;
  tmpvar_22 = (((tmpvar_16 * tmpvar_16) * (tmpvar_21 - 1.0)) + 1.0);
  mediump float x_23;
  x_23 = (1.0 - tmpvar_10);
  mediump float x_24;
  x_24 = (1.0 - tmpvar_17);
  mediump float tmpvar_25;
  tmpvar_25 = (0.5 + ((2.0 * tmpvar_18) * (tmpvar_18 * tmpvar_13)));
  specularTerm_12 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_10) / ((
      (tmpvar_10 * ((tmpvar_17 * (1.0 - tmpvar_19)) + tmpvar_19))
     + 
      (tmpvar_17 * ((tmpvar_10 * (1.0 - tmpvar_19)) + tmpvar_19))
    ) + 1e-05)) * (tmpvar_21 / ((3.141593 * tmpvar_22) * tmpvar_22)))
   * 0.7853982)));
  mediump float tmpvar_26;
  tmpvar_26 = max (0.0, (specularTerm_12 * tmpvar_10));
  specularTerm_12 = tmpvar_26;
  mediump float x_27;
  x_27 = (1.0 - tmpvar_18);
  mediump vec4 tmpvar_28;
  tmpvar_28.w = 1.0;
  tmpvar_28.xyz = (((tmpvar_2 * 
    (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w))
  ) * (tmpvar_9 * 
    (((1.0 + (
      (tmpvar_25 - 1.0)
     * 
      ((x_23 * x_23) * ((x_23 * x_23) * x_23))
    )) * (1.0 + (
      (tmpvar_25 - 1.0)
     * 
      ((x_24 * x_24) * ((x_24 * x_24) * x_24))
    ))) * tmpvar_10)
  )) + ((tmpvar_26 * tmpvar_9) * (tmpvar_3 + 
    ((1.0 - tmpvar_3) * ((x_27 * x_27) * ((x_27 * x_27) * x_27)))
  )));
  mediump vec4 xlat_varoutput_29;
  xlat_varoutput_29.xyz = tmpvar_28.xyz;
  xlat_varoutput_29.w = 1.0;
  gl_FragData[0] = xlat_varoutput_29;
}


#endif
"
}
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_OFF" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform mediump vec4 _WorldSpaceLightPos0;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp mat3 tangentToWorld_5;
  highp vec4 tmpvar_6;
  mediump vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  highp vec4 tmpvar_10;
  tmpvar_10 = (_Object2World * _glesVertex);
  tmpvar_6 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_11;
  texcoord_11.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_12;
  if ((_UVSec == 0.0)) {
    tmpvar_12 = tmpvar_2;
  } else {
    tmpvar_12 = tmpvar_3;
  };
  texcoord_11.zw = ((tmpvar_12 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_13;
  n_13 = (tmpvar_10.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_14;
  norm_14 = tmpvar_1;
  highp vec4 v_15;
  v_15.x = _World2Object[0].x;
  v_15.y = _World2Object[1].x;
  v_15.z = _World2Object[2].x;
  v_15.w = _World2Object[3].x;
  highp vec4 v_16;
  v_16.x = _World2Object[0].y;
  v_16.y = _World2Object[1].y;
  v_16.z = _World2Object[2].y;
  v_16.w = _World2Object[3].y;
  highp vec4 v_17;
  v_17.x = _World2Object[0].z;
  v_17.y = _World2Object[1].z;
  v_17.z = _World2Object[2].z;
  v_17.w = _World2Object[3].z;
  highp vec3 tmpvar_18;
  tmpvar_18 = normalize(((
    (v_15.xyz * norm_14.x)
   + 
    (v_16.xyz * norm_14.y)
  ) + (v_17.xyz * norm_14.z)));
  highp vec3 dir_19;
  dir_19 = tmpvar_4.xyz;
  highp mat3 tmpvar_20;
  tmpvar_20[0] = _Object2World[0].xyz;
  tmpvar_20[1] = _Object2World[1].xyz;
  tmpvar_20[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_21;
  tmpvar_21.xyz = normalize((tmpvar_20 * dir_19));
  tmpvar_21.w = tmpvar_4.w;
  mediump vec3 normal_22;
  normal_22 = tmpvar_18;
  mediump vec3 tangent_23;
  tangent_23 = tmpvar_21.xyz;
  mediump float tangentSign_24;
  tangentSign_24 = tmpvar_21.w;
  mediump float xlat_varsign_25;
  highp float tmpvar_26;
  tmpvar_26 = (tangentSign_24 * unity_WorldTransformParams.w);
  xlat_varsign_25 = tmpvar_26;
  mediump vec3 tmpvar_27;
  tmpvar_27 = (((normal_22.yzx * tangent_23.zxy) - (normal_22.zxy * tangent_23.yzx)) * xlat_varsign_25);
  mediump mat3 tmpvar_28;
  tmpvar_28[0].x = tangent_23.x;
  tmpvar_28[0].y = tmpvar_27.x;
  tmpvar_28[0].z = normal_22.x;
  tmpvar_28[1].x = tangent_23.y;
  tmpvar_28[1].y = tmpvar_27.y;
  tmpvar_28[1].z = normal_22.y;
  tmpvar_28[2].x = tangent_23.z;
  tmpvar_28[2].y = tmpvar_27.z;
  tmpvar_28[2].z = normal_22.z;
  tangentToWorld_5 = tmpvar_28;
  highp vec3 v_29;
  v_29.x = tangentToWorld_5[0].x;
  v_29.y = tangentToWorld_5[1].x;
  v_29.z = tangentToWorld_5[2].x;
  tmpvar_7.xyz = v_29;
  highp vec3 v_30;
  v_30.x = tangentToWorld_5[0].y;
  v_30.y = tangentToWorld_5[1].y;
  v_30.z = tangentToWorld_5[2].y;
  tmpvar_8.xyz = v_30;
  highp vec3 v_31;
  v_31.x = tangentToWorld_5[0].z;
  v_31.y = tangentToWorld_5[1].z;
  v_31.z = tangentToWorld_5[2].z;
  tmpvar_9.xyz = v_31;
  highp vec3 tmpvar_32;
  tmpvar_32 = (_WorldSpaceLightPos0.xyz - (tmpvar_10.xyz * _WorldSpaceLightPos0.w));
  tmpvar_7.w = tmpvar_32.x;
  tmpvar_8.w = tmpvar_32.y;
  tmpvar_9.w = tmpvar_32.z;
  gl_Position = tmpvar_6;
  xlv_TEXCOORD0 = texcoord_11;
  xlv_TEXCOORD1 = normalize(n_13);
  xlv_TEXCOORD2 = tmpvar_7;
  xlv_TEXCOORD2_1 = tmpvar_8;
  xlv_TEXCOORD2_2 = tmpvar_9;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  tmpvar_3 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  mediump vec3 tmpvar_4;
  tmpvar_4 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_5;
  tmpvar_5.x = xlv_TEXCOORD2.w;
  tmpvar_5.y = xlv_TEXCOORD2_1.w;
  tmpvar_5.z = xlv_TEXCOORD2_2.w;
  mediump vec3 tmpvar_6;
  tmpvar_6 = _LightColor0.xyz;
  mediump float tmpvar_7;
  tmpvar_7 = clamp (dot (tmpvar_4, tmpvar_5), 0.0, 1.0);
  mediump vec3 viewDir_8;
  viewDir_8 = -(xlv_TEXCOORD1);
  mediump float specularTerm_9;
  mediump float tmpvar_10;
  tmpvar_10 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_11;
  mediump vec3 inVec_12;
  inVec_12 = (tmpvar_5 + viewDir_8);
  tmpvar_11 = (inVec_12 * inversesqrt(max (0.001, 
    dot (inVec_12, inVec_12)
  )));
  mediump float tmpvar_13;
  tmpvar_13 = clamp (dot (tmpvar_4, tmpvar_11), 0.0, 1.0);
  mediump float tmpvar_14;
  tmpvar_14 = clamp (dot (tmpvar_4, viewDir_8), 0.0, 1.0);
  mediump float tmpvar_15;
  tmpvar_15 = clamp (dot (tmpvar_5, tmpvar_11), 0.0, 1.0);
  mediump float tmpvar_16;
  tmpvar_16 = (tmpvar_10 * tmpvar_10);
  mediump float tmpvar_17;
  tmpvar_17 = (tmpvar_10 * tmpvar_10);
  mediump float tmpvar_18;
  tmpvar_18 = (tmpvar_17 * tmpvar_17);
  mediump float tmpvar_19;
  tmpvar_19 = (((tmpvar_13 * tmpvar_13) * (tmpvar_18 - 1.0)) + 1.0);
  mediump float x_20;
  x_20 = (1.0 - tmpvar_7);
  mediump float x_21;
  x_21 = (1.0 - tmpvar_14);
  mediump float tmpvar_22;
  tmpvar_22 = (0.5 + ((2.0 * tmpvar_15) * (tmpvar_15 * tmpvar_10)));
  specularTerm_9 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_7) / ((
      (tmpvar_7 * ((tmpvar_14 * (1.0 - tmpvar_16)) + tmpvar_16))
     + 
      (tmpvar_14 * ((tmpvar_7 * (1.0 - tmpvar_16)) + tmpvar_16))
    ) + 1e-05)) * (tmpvar_18 / ((3.141593 * tmpvar_19) * tmpvar_19)))
   * 0.7853982)));
  mediump float tmpvar_23;
  tmpvar_23 = max (0.0, (specularTerm_9 * tmpvar_7));
  specularTerm_9 = tmpvar_23;
  mediump float x_24;
  x_24 = (1.0 - tmpvar_15);
  mediump vec4 tmpvar_25;
  tmpvar_25.w = 1.0;
  tmpvar_25.xyz = (((tmpvar_2 * 
    (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w))
  ) * (tmpvar_6 * 
    (((1.0 + (
      (tmpvar_22 - 1.0)
     * 
      ((x_20 * x_20) * ((x_20 * x_20) * x_20))
    )) * (1.0 + (
      (tmpvar_22 - 1.0)
     * 
      ((x_21 * x_21) * ((x_21 * x_21) * x_21))
    ))) * tmpvar_7)
  )) + ((tmpvar_23 * tmpvar_6) * (tmpvar_3 + 
    ((1.0 - tmpvar_3) * ((x_24 * x_24) * ((x_24 * x_24) * x_24)))
  )));
  mediump vec4 xlat_varoutput_26;
  xlat_varoutput_26.xyz = tmpvar_25.xyz;
  xlat_varoutput_26.w = 1.0;
  gl_FragData[0] = xlat_varoutput_26;
}


#endif
"
}
SubProgram "gles " {
Keywords { "SPOT" "SHADOWS_OFF" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _WorldSpaceLightPos0;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
uniform mediump mat4 _LightMatrix0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp vec3 lightDir_5;
  highp mat3 tangentToWorld_6;
  highp vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  mediump vec4 tmpvar_10;
  mediump vec4 tmpvar_11;
  highp vec4 tmpvar_12;
  tmpvar_12 = (_Object2World * _glesVertex);
  tmpvar_7 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_13;
  texcoord_13.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_14;
  if ((_UVSec == 0.0)) {
    tmpvar_14 = tmpvar_2;
  } else {
    tmpvar_14 = tmpvar_3;
  };
  texcoord_13.zw = ((tmpvar_14 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_15;
  n_15 = (tmpvar_12.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_16;
  norm_16 = tmpvar_1;
  highp vec4 v_17;
  v_17.x = _World2Object[0].x;
  v_17.y = _World2Object[1].x;
  v_17.z = _World2Object[2].x;
  v_17.w = _World2Object[3].x;
  highp vec4 v_18;
  v_18.x = _World2Object[0].y;
  v_18.y = _World2Object[1].y;
  v_18.z = _World2Object[2].y;
  v_18.w = _World2Object[3].y;
  highp vec4 v_19;
  v_19.x = _World2Object[0].z;
  v_19.y = _World2Object[1].z;
  v_19.z = _World2Object[2].z;
  v_19.w = _World2Object[3].z;
  highp vec3 tmpvar_20;
  tmpvar_20 = normalize(((
    (v_17.xyz * norm_16.x)
   + 
    (v_18.xyz * norm_16.y)
  ) + (v_19.xyz * norm_16.z)));
  highp vec3 dir_21;
  dir_21 = tmpvar_4.xyz;
  highp mat3 tmpvar_22;
  tmpvar_22[0] = _Object2World[0].xyz;
  tmpvar_22[1] = _Object2World[1].xyz;
  tmpvar_22[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_23;
  tmpvar_23.xyz = normalize((tmpvar_22 * dir_21));
  tmpvar_23.w = tmpvar_4.w;
  mediump vec3 normal_24;
  normal_24 = tmpvar_20;
  mediump vec3 tangent_25;
  tangent_25 = tmpvar_23.xyz;
  mediump float tangentSign_26;
  tangentSign_26 = tmpvar_23.w;
  mediump float xlat_varsign_27;
  highp float tmpvar_28;
  tmpvar_28 = (tangentSign_26 * unity_WorldTransformParams.w);
  xlat_varsign_27 = tmpvar_28;
  mediump vec3 tmpvar_29;
  tmpvar_29 = (((normal_24.yzx * tangent_25.zxy) - (normal_24.zxy * tangent_25.yzx)) * xlat_varsign_27);
  mediump mat3 tmpvar_30;
  tmpvar_30[0].x = tangent_25.x;
  tmpvar_30[0].y = tmpvar_29.x;
  tmpvar_30[0].z = normal_24.x;
  tmpvar_30[1].x = tangent_25.y;
  tmpvar_30[1].y = tmpvar_29.y;
  tmpvar_30[1].z = normal_24.y;
  tmpvar_30[2].x = tangent_25.z;
  tmpvar_30[2].y = tmpvar_29.z;
  tmpvar_30[2].z = normal_24.z;
  tangentToWorld_6 = tmpvar_30;
  highp vec3 v_31;
  v_31.x = tangentToWorld_6[0].x;
  v_31.y = tangentToWorld_6[1].x;
  v_31.z = tangentToWorld_6[2].x;
  tmpvar_8.xyz = v_31;
  highp vec3 v_32;
  v_32.x = tangentToWorld_6[0].y;
  v_32.y = tangentToWorld_6[1].y;
  v_32.z = tangentToWorld_6[2].y;
  tmpvar_9.xyz = v_32;
  highp vec3 v_33;
  v_33.x = tangentToWorld_6[0].z;
  v_33.y = tangentToWorld_6[1].z;
  v_33.z = tangentToWorld_6[2].z;
  tmpvar_10.xyz = v_33;
  tmpvar_11 = (_LightMatrix0 * (_Object2World * _glesVertex));
  highp vec3 tmpvar_34;
  tmpvar_34 = (_WorldSpaceLightPos0.xyz - (tmpvar_12.xyz * _WorldSpaceLightPos0.w));
  mediump vec3 n_35;
  n_35 = tmpvar_34;
  mediump vec3 tmpvar_36;
  tmpvar_36 = normalize(n_35);
  lightDir_5 = tmpvar_36;
  tmpvar_8.w = lightDir_5.x;
  tmpvar_9.w = lightDir_5.y;
  tmpvar_10.w = lightDir_5.z;
  gl_Position = tmpvar_7;
  xlv_TEXCOORD0 = texcoord_13;
  xlv_TEXCOORD1 = normalize(n_15);
  xlv_TEXCOORD2 = tmpvar_8;
  xlv_TEXCOORD2_1 = tmpvar_9;
  xlv_TEXCOORD2_2 = tmpvar_10;
  xlv_TEXCOORD5 = tmpvar_11;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform sampler2D _LightTexture0;
uniform sampler2D _LightTextureB0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  tmpvar_3 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  mediump vec3 tmpvar_4;
  tmpvar_4 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_5;
  tmpvar_5.x = xlv_TEXCOORD2.w;
  tmpvar_5.y = xlv_TEXCOORD2_1.w;
  tmpvar_5.z = xlv_TEXCOORD2_2.w;
  lowp vec4 tmpvar_6;
  mediump vec2 P_7;
  P_7 = ((xlv_TEXCOORD5.xy / xlv_TEXCOORD5.w) + 0.5);
  tmpvar_6 = texture2D (_LightTexture0, P_7);
  highp vec3 LightCoord_8;
  LightCoord_8 = xlv_TEXCOORD5.xyz;
  highp float tmpvar_9;
  tmpvar_9 = dot (LightCoord_8, LightCoord_8);
  lowp vec4 tmpvar_10;
  tmpvar_10 = texture2D (_LightTextureB0, vec2(tmpvar_9));
  mediump vec3 tmpvar_11;
  tmpvar_11 = _LightColor0.xyz;
  mediump float tmpvar_12;
  tmpvar_12 = clamp (dot (tmpvar_4, tmpvar_5), 0.0, 1.0);
  tmpvar_11 = (tmpvar_11 * ((
    float((xlv_TEXCOORD5.z > 0.0))
   * tmpvar_6.w) * tmpvar_10.w));
  mediump vec3 viewDir_13;
  viewDir_13 = -(xlv_TEXCOORD1);
  mediump float specularTerm_14;
  mediump float tmpvar_15;
  tmpvar_15 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_16;
  mediump vec3 inVec_17;
  inVec_17 = (tmpvar_5 + viewDir_13);
  tmpvar_16 = (inVec_17 * inversesqrt(max (0.001, 
    dot (inVec_17, inVec_17)
  )));
  mediump float tmpvar_18;
  tmpvar_18 = clamp (dot (tmpvar_4, tmpvar_16), 0.0, 1.0);
  mediump float tmpvar_19;
  tmpvar_19 = clamp (dot (tmpvar_4, viewDir_13), 0.0, 1.0);
  mediump float tmpvar_20;
  tmpvar_20 = clamp (dot (tmpvar_5, tmpvar_16), 0.0, 1.0);
  mediump float tmpvar_21;
  tmpvar_21 = (tmpvar_15 * tmpvar_15);
  mediump float tmpvar_22;
  tmpvar_22 = (tmpvar_15 * tmpvar_15);
  mediump float tmpvar_23;
  tmpvar_23 = (tmpvar_22 * tmpvar_22);
  mediump float tmpvar_24;
  tmpvar_24 = (((tmpvar_18 * tmpvar_18) * (tmpvar_23 - 1.0)) + 1.0);
  mediump float x_25;
  x_25 = (1.0 - tmpvar_12);
  mediump float x_26;
  x_26 = (1.0 - tmpvar_19);
  mediump float tmpvar_27;
  tmpvar_27 = (0.5 + ((2.0 * tmpvar_20) * (tmpvar_20 * tmpvar_15)));
  specularTerm_14 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_12) / ((
      (tmpvar_12 * ((tmpvar_19 * (1.0 - tmpvar_21)) + tmpvar_21))
     + 
      (tmpvar_19 * ((tmpvar_12 * (1.0 - tmpvar_21)) + tmpvar_21))
    ) + 1e-05)) * (tmpvar_23 / ((3.141593 * tmpvar_24) * tmpvar_24)))
   * 0.7853982)));
  mediump float tmpvar_28;
  tmpvar_28 = max (0.0, (specularTerm_14 * tmpvar_12));
  specularTerm_14 = tmpvar_28;
  mediump float x_29;
  x_29 = (1.0 - tmpvar_20);
  mediump vec4 tmpvar_30;
  tmpvar_30.w = 1.0;
  tmpvar_30.xyz = (((tmpvar_2 * 
    (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w))
  ) * (tmpvar_11 * 
    (((1.0 + (
      (tmpvar_27 - 1.0)
     * 
      ((x_25 * x_25) * ((x_25 * x_25) * x_25))
    )) * (1.0 + (
      (tmpvar_27 - 1.0)
     * 
      ((x_26 * x_26) * ((x_26 * x_26) * x_26))
    ))) * tmpvar_12)
  )) + ((tmpvar_28 * tmpvar_11) * (tmpvar_3 + 
    ((1.0 - tmpvar_3) * ((x_29 * x_29) * ((x_29 * x_29) * x_29)))
  )));
  mediump vec4 xlat_varoutput_31;
  xlat_varoutput_31.xyz = tmpvar_30.xyz;
  xlat_varoutput_31.w = 1.0;
  gl_FragData[0] = xlat_varoutput_31;
}


#endif
"
}
SubProgram "gles " {
Keywords { "POINT_COOKIE" "SHADOWS_OFF" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _WorldSpaceLightPos0;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
uniform mediump mat4 _LightMatrix0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec3 xlv_TEXCOORD5;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp vec3 lightDir_5;
  highp mat3 tangentToWorld_6;
  highp vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  mediump vec4 tmpvar_10;
  highp vec4 tmpvar_11;
  tmpvar_11 = (_Object2World * _glesVertex);
  tmpvar_7 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_12;
  texcoord_12.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_13;
  if ((_UVSec == 0.0)) {
    tmpvar_13 = tmpvar_2;
  } else {
    tmpvar_13 = tmpvar_3;
  };
  texcoord_12.zw = ((tmpvar_13 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_14;
  n_14 = (tmpvar_11.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_15;
  norm_15 = tmpvar_1;
  highp vec4 v_16;
  v_16.x = _World2Object[0].x;
  v_16.y = _World2Object[1].x;
  v_16.z = _World2Object[2].x;
  v_16.w = _World2Object[3].x;
  highp vec4 v_17;
  v_17.x = _World2Object[0].y;
  v_17.y = _World2Object[1].y;
  v_17.z = _World2Object[2].y;
  v_17.w = _World2Object[3].y;
  highp vec4 v_18;
  v_18.x = _World2Object[0].z;
  v_18.y = _World2Object[1].z;
  v_18.z = _World2Object[2].z;
  v_18.w = _World2Object[3].z;
  highp vec3 tmpvar_19;
  tmpvar_19 = normalize(((
    (v_16.xyz * norm_15.x)
   + 
    (v_17.xyz * norm_15.y)
  ) + (v_18.xyz * norm_15.z)));
  highp vec3 dir_20;
  dir_20 = tmpvar_4.xyz;
  highp mat3 tmpvar_21;
  tmpvar_21[0] = _Object2World[0].xyz;
  tmpvar_21[1] = _Object2World[1].xyz;
  tmpvar_21[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_22;
  tmpvar_22.xyz = normalize((tmpvar_21 * dir_20));
  tmpvar_22.w = tmpvar_4.w;
  mediump vec3 normal_23;
  normal_23 = tmpvar_19;
  mediump vec3 tangent_24;
  tangent_24 = tmpvar_22.xyz;
  mediump float tangentSign_25;
  tangentSign_25 = tmpvar_22.w;
  mediump float xlat_varsign_26;
  highp float tmpvar_27;
  tmpvar_27 = (tangentSign_25 * unity_WorldTransformParams.w);
  xlat_varsign_26 = tmpvar_27;
  mediump vec3 tmpvar_28;
  tmpvar_28 = (((normal_23.yzx * tangent_24.zxy) - (normal_23.zxy * tangent_24.yzx)) * xlat_varsign_26);
  mediump mat3 tmpvar_29;
  tmpvar_29[0].x = tangent_24.x;
  tmpvar_29[0].y = tmpvar_28.x;
  tmpvar_29[0].z = normal_23.x;
  tmpvar_29[1].x = tangent_24.y;
  tmpvar_29[1].y = tmpvar_28.y;
  tmpvar_29[1].z = normal_23.y;
  tmpvar_29[2].x = tangent_24.z;
  tmpvar_29[2].y = tmpvar_28.z;
  tmpvar_29[2].z = normal_23.z;
  tangentToWorld_6 = tmpvar_29;
  highp vec3 v_30;
  v_30.x = tangentToWorld_6[0].x;
  v_30.y = tangentToWorld_6[1].x;
  v_30.z = tangentToWorld_6[2].x;
  tmpvar_8.xyz = v_30;
  highp vec3 v_31;
  v_31.x = tangentToWorld_6[0].y;
  v_31.y = tangentToWorld_6[1].y;
  v_31.z = tangentToWorld_6[2].y;
  tmpvar_9.xyz = v_31;
  highp vec3 v_32;
  v_32.x = tangentToWorld_6[0].z;
  v_32.y = tangentToWorld_6[1].z;
  v_32.z = tangentToWorld_6[2].z;
  tmpvar_10.xyz = v_32;
  highp vec3 tmpvar_33;
  tmpvar_33 = (_WorldSpaceLightPos0.xyz - (tmpvar_11.xyz * _WorldSpaceLightPos0.w));
  mediump vec3 n_34;
  n_34 = tmpvar_33;
  mediump vec3 tmpvar_35;
  tmpvar_35 = normalize(n_34);
  lightDir_5 = tmpvar_35;
  tmpvar_8.w = lightDir_5.x;
  tmpvar_9.w = lightDir_5.y;
  tmpvar_10.w = lightDir_5.z;
  gl_Position = tmpvar_7;
  xlv_TEXCOORD0 = texcoord_12;
  xlv_TEXCOORD1 = normalize(n_14);
  xlv_TEXCOORD2 = tmpvar_8;
  xlv_TEXCOORD2_1 = tmpvar_9;
  xlv_TEXCOORD2_2 = tmpvar_10;
  xlv_TEXCOORD5 = (_LightMatrix0 * (_Object2World * _glesVertex)).xyz;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform lowp samplerCube _LightTexture0;
uniform sampler2D _LightTextureB0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec3 xlv_TEXCOORD5;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  tmpvar_3 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  mediump vec3 tmpvar_4;
  tmpvar_4 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_5;
  tmpvar_5.x = xlv_TEXCOORD2.w;
  tmpvar_5.y = xlv_TEXCOORD2_1.w;
  tmpvar_5.z = xlv_TEXCOORD2_2.w;
  highp float tmpvar_6;
  tmpvar_6 = dot (xlv_TEXCOORD5, xlv_TEXCOORD5);
  lowp vec4 tmpvar_7;
  tmpvar_7 = texture2D (_LightTextureB0, vec2(tmpvar_6));
  lowp vec4 tmpvar_8;
  tmpvar_8 = textureCube (_LightTexture0, xlv_TEXCOORD5);
  mediump float atten_9;
  atten_9 = (tmpvar_7.w * tmpvar_8.w);
  mediump vec3 tmpvar_10;
  tmpvar_10 = _LightColor0.xyz;
  mediump float tmpvar_11;
  tmpvar_11 = clamp (dot (tmpvar_4, tmpvar_5), 0.0, 1.0);
  tmpvar_10 = (tmpvar_10 * atten_9);
  mediump vec3 viewDir_12;
  viewDir_12 = -(xlv_TEXCOORD1);
  mediump float specularTerm_13;
  mediump float tmpvar_14;
  tmpvar_14 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_15;
  mediump vec3 inVec_16;
  inVec_16 = (tmpvar_5 + viewDir_12);
  tmpvar_15 = (inVec_16 * inversesqrt(max (0.001, 
    dot (inVec_16, inVec_16)
  )));
  mediump float tmpvar_17;
  tmpvar_17 = clamp (dot (tmpvar_4, tmpvar_15), 0.0, 1.0);
  mediump float tmpvar_18;
  tmpvar_18 = clamp (dot (tmpvar_4, viewDir_12), 0.0, 1.0);
  mediump float tmpvar_19;
  tmpvar_19 = clamp (dot (tmpvar_5, tmpvar_15), 0.0, 1.0);
  mediump float tmpvar_20;
  tmpvar_20 = (tmpvar_14 * tmpvar_14);
  mediump float tmpvar_21;
  tmpvar_21 = (tmpvar_14 * tmpvar_14);
  mediump float tmpvar_22;
  tmpvar_22 = (tmpvar_21 * tmpvar_21);
  mediump float tmpvar_23;
  tmpvar_23 = (((tmpvar_17 * tmpvar_17) * (tmpvar_22 - 1.0)) + 1.0);
  mediump float x_24;
  x_24 = (1.0 - tmpvar_11);
  mediump float x_25;
  x_25 = (1.0 - tmpvar_18);
  mediump float tmpvar_26;
  tmpvar_26 = (0.5 + ((2.0 * tmpvar_19) * (tmpvar_19 * tmpvar_14)));
  specularTerm_13 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_11) / ((
      (tmpvar_11 * ((tmpvar_18 * (1.0 - tmpvar_20)) + tmpvar_20))
     + 
      (tmpvar_18 * ((tmpvar_11 * (1.0 - tmpvar_20)) + tmpvar_20))
    ) + 1e-05)) * (tmpvar_22 / ((3.141593 * tmpvar_23) * tmpvar_23)))
   * 0.7853982)));
  mediump float tmpvar_27;
  tmpvar_27 = max (0.0, (specularTerm_13 * tmpvar_11));
  specularTerm_13 = tmpvar_27;
  mediump float x_28;
  x_28 = (1.0 - tmpvar_19);
  mediump vec4 tmpvar_29;
  tmpvar_29.w = 1.0;
  tmpvar_29.xyz = (((tmpvar_2 * 
    (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w))
  ) * (tmpvar_10 * 
    (((1.0 + (
      (tmpvar_26 - 1.0)
     * 
      ((x_24 * x_24) * ((x_24 * x_24) * x_24))
    )) * (1.0 + (
      (tmpvar_26 - 1.0)
     * 
      ((x_25 * x_25) * ((x_25 * x_25) * x_25))
    ))) * tmpvar_11)
  )) + ((tmpvar_27 * tmpvar_10) * (tmpvar_3 + 
    ((1.0 - tmpvar_3) * ((x_28 * x_28) * ((x_28 * x_28) * x_28)))
  )));
  mediump vec4 xlat_varoutput_30;
  xlat_varoutput_30.xyz = tmpvar_29.xyz;
  xlat_varoutput_30.w = 1.0;
  gl_FragData[0] = xlat_varoutput_30;
}


#endif
"
}
SubProgram "gles " {
Keywords { "DIRECTIONAL_COOKIE" "SHADOWS_OFF" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform mediump vec4 _WorldSpaceLightPos0;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
uniform mediump mat4 _LightMatrix0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec2 xlv_TEXCOORD5;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp mat3 tangentToWorld_5;
  highp vec4 tmpvar_6;
  mediump vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  highp vec4 tmpvar_10;
  tmpvar_10 = (_Object2World * _glesVertex);
  tmpvar_6 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_11;
  texcoord_11.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_12;
  if ((_UVSec == 0.0)) {
    tmpvar_12 = tmpvar_2;
  } else {
    tmpvar_12 = tmpvar_3;
  };
  texcoord_11.zw = ((tmpvar_12 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_13;
  n_13 = (tmpvar_10.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_14;
  norm_14 = tmpvar_1;
  highp vec4 v_15;
  v_15.x = _World2Object[0].x;
  v_15.y = _World2Object[1].x;
  v_15.z = _World2Object[2].x;
  v_15.w = _World2Object[3].x;
  highp vec4 v_16;
  v_16.x = _World2Object[0].y;
  v_16.y = _World2Object[1].y;
  v_16.z = _World2Object[2].y;
  v_16.w = _World2Object[3].y;
  highp vec4 v_17;
  v_17.x = _World2Object[0].z;
  v_17.y = _World2Object[1].z;
  v_17.z = _World2Object[2].z;
  v_17.w = _World2Object[3].z;
  highp vec3 tmpvar_18;
  tmpvar_18 = normalize(((
    (v_15.xyz * norm_14.x)
   + 
    (v_16.xyz * norm_14.y)
  ) + (v_17.xyz * norm_14.z)));
  highp vec3 dir_19;
  dir_19 = tmpvar_4.xyz;
  highp mat3 tmpvar_20;
  tmpvar_20[0] = _Object2World[0].xyz;
  tmpvar_20[1] = _Object2World[1].xyz;
  tmpvar_20[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_21;
  tmpvar_21.xyz = normalize((tmpvar_20 * dir_19));
  tmpvar_21.w = tmpvar_4.w;
  mediump vec3 normal_22;
  normal_22 = tmpvar_18;
  mediump vec3 tangent_23;
  tangent_23 = tmpvar_21.xyz;
  mediump float tangentSign_24;
  tangentSign_24 = tmpvar_21.w;
  mediump float xlat_varsign_25;
  highp float tmpvar_26;
  tmpvar_26 = (tangentSign_24 * unity_WorldTransformParams.w);
  xlat_varsign_25 = tmpvar_26;
  mediump vec3 tmpvar_27;
  tmpvar_27 = (((normal_22.yzx * tangent_23.zxy) - (normal_22.zxy * tangent_23.yzx)) * xlat_varsign_25);
  mediump mat3 tmpvar_28;
  tmpvar_28[0].x = tangent_23.x;
  tmpvar_28[0].y = tmpvar_27.x;
  tmpvar_28[0].z = normal_22.x;
  tmpvar_28[1].x = tangent_23.y;
  tmpvar_28[1].y = tmpvar_27.y;
  tmpvar_28[1].z = normal_22.y;
  tmpvar_28[2].x = tangent_23.z;
  tmpvar_28[2].y = tmpvar_27.z;
  tmpvar_28[2].z = normal_22.z;
  tangentToWorld_5 = tmpvar_28;
  highp vec3 v_29;
  v_29.x = tangentToWorld_5[0].x;
  v_29.y = tangentToWorld_5[1].x;
  v_29.z = tangentToWorld_5[2].x;
  tmpvar_7.xyz = v_29;
  highp vec3 v_30;
  v_30.x = tangentToWorld_5[0].y;
  v_30.y = tangentToWorld_5[1].y;
  v_30.z = tangentToWorld_5[2].y;
  tmpvar_8.xyz = v_30;
  highp vec3 v_31;
  v_31.x = tangentToWorld_5[0].z;
  v_31.y = tangentToWorld_5[1].z;
  v_31.z = tangentToWorld_5[2].z;
  tmpvar_9.xyz = v_31;
  highp vec3 tmpvar_32;
  tmpvar_32 = (_WorldSpaceLightPos0.xyz - (tmpvar_10.xyz * _WorldSpaceLightPos0.w));
  tmpvar_7.w = tmpvar_32.x;
  tmpvar_8.w = tmpvar_32.y;
  tmpvar_9.w = tmpvar_32.z;
  gl_Position = tmpvar_6;
  xlv_TEXCOORD0 = texcoord_11;
  xlv_TEXCOORD1 = normalize(n_13);
  xlv_TEXCOORD2 = tmpvar_7;
  xlv_TEXCOORD2_1 = tmpvar_8;
  xlv_TEXCOORD2_2 = tmpvar_9;
  xlv_TEXCOORD5 = (_LightMatrix0 * (_Object2World * _glesVertex)).xy;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform sampler2D _LightTexture0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec2 xlv_TEXCOORD5;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  tmpvar_3 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  mediump vec3 tmpvar_4;
  tmpvar_4 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_5;
  tmpvar_5.x = xlv_TEXCOORD2.w;
  tmpvar_5.y = xlv_TEXCOORD2_1.w;
  tmpvar_5.z = xlv_TEXCOORD2_2.w;
  lowp vec4 tmpvar_6;
  tmpvar_6 = texture2D (_LightTexture0, xlv_TEXCOORD5);
  mediump float atten_7;
  atten_7 = tmpvar_6.w;
  mediump vec3 tmpvar_8;
  tmpvar_8 = _LightColor0.xyz;
  mediump float tmpvar_9;
  tmpvar_9 = clamp (dot (tmpvar_4, tmpvar_5), 0.0, 1.0);
  tmpvar_8 = (tmpvar_8 * atten_7);
  mediump vec3 viewDir_10;
  viewDir_10 = -(xlv_TEXCOORD1);
  mediump float specularTerm_11;
  mediump float tmpvar_12;
  tmpvar_12 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_13;
  mediump vec3 inVec_14;
  inVec_14 = (tmpvar_5 + viewDir_10);
  tmpvar_13 = (inVec_14 * inversesqrt(max (0.001, 
    dot (inVec_14, inVec_14)
  )));
  mediump float tmpvar_15;
  tmpvar_15 = clamp (dot (tmpvar_4, tmpvar_13), 0.0, 1.0);
  mediump float tmpvar_16;
  tmpvar_16 = clamp (dot (tmpvar_4, viewDir_10), 0.0, 1.0);
  mediump float tmpvar_17;
  tmpvar_17 = clamp (dot (tmpvar_5, tmpvar_13), 0.0, 1.0);
  mediump float tmpvar_18;
  tmpvar_18 = (tmpvar_12 * tmpvar_12);
  mediump float tmpvar_19;
  tmpvar_19 = (tmpvar_12 * tmpvar_12);
  mediump float tmpvar_20;
  tmpvar_20 = (tmpvar_19 * tmpvar_19);
  mediump float tmpvar_21;
  tmpvar_21 = (((tmpvar_15 * tmpvar_15) * (tmpvar_20 - 1.0)) + 1.0);
  mediump float x_22;
  x_22 = (1.0 - tmpvar_9);
  mediump float x_23;
  x_23 = (1.0 - tmpvar_16);
  mediump float tmpvar_24;
  tmpvar_24 = (0.5 + ((2.0 * tmpvar_17) * (tmpvar_17 * tmpvar_12)));
  specularTerm_11 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_9) / ((
      (tmpvar_9 * ((tmpvar_16 * (1.0 - tmpvar_18)) + tmpvar_18))
     + 
      (tmpvar_16 * ((tmpvar_9 * (1.0 - tmpvar_18)) + tmpvar_18))
    ) + 1e-05)) * (tmpvar_20 / ((3.141593 * tmpvar_21) * tmpvar_21)))
   * 0.7853982)));
  mediump float tmpvar_25;
  tmpvar_25 = max (0.0, (specularTerm_11 * tmpvar_9));
  specularTerm_11 = tmpvar_25;
  mediump float x_26;
  x_26 = (1.0 - tmpvar_17);
  mediump vec4 tmpvar_27;
  tmpvar_27.w = 1.0;
  tmpvar_27.xyz = (((tmpvar_2 * 
    (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w))
  ) * (tmpvar_8 * 
    (((1.0 + (
      (tmpvar_24 - 1.0)
     * 
      ((x_22 * x_22) * ((x_22 * x_22) * x_22))
    )) * (1.0 + (
      (tmpvar_24 - 1.0)
     * 
      ((x_23 * x_23) * ((x_23 * x_23) * x_23))
    ))) * tmpvar_9)
  )) + ((tmpvar_25 * tmpvar_8) * (tmpvar_3 + 
    ((1.0 - tmpvar_3) * ((x_26 * x_26) * ((x_26 * x_26) * x_26)))
  )));
  mediump vec4 xlat_varoutput_28;
  xlat_varoutput_28.xyz = tmpvar_27.xyz;
  xlat_varoutput_28.w = 1.0;
  gl_FragData[0] = xlat_varoutput_28;
}


#endif
"
}
SubProgram "gles " {
Keywords { "SPOT" "SHADOWS_DEPTH" "SHADOWS_NONATIVE" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _WorldSpaceLightPos0;
uniform highp mat4 unity_World2Shadow[4];
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
uniform mediump mat4 _LightMatrix0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp vec3 lightDir_5;
  highp mat3 tangentToWorld_6;
  highp vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  mediump vec4 tmpvar_10;
  mediump vec4 tmpvar_11;
  mediump vec4 tmpvar_12;
  highp vec4 tmpvar_13;
  tmpvar_13 = (_Object2World * _glesVertex);
  tmpvar_7 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_14;
  texcoord_14.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_15;
  if ((_UVSec == 0.0)) {
    tmpvar_15 = tmpvar_2;
  } else {
    tmpvar_15 = tmpvar_3;
  };
  texcoord_14.zw = ((tmpvar_15 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_16;
  n_16 = (tmpvar_13.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_17;
  norm_17 = tmpvar_1;
  highp vec4 v_18;
  v_18.x = _World2Object[0].x;
  v_18.y = _World2Object[1].x;
  v_18.z = _World2Object[2].x;
  v_18.w = _World2Object[3].x;
  highp vec4 v_19;
  v_19.x = _World2Object[0].y;
  v_19.y = _World2Object[1].y;
  v_19.z = _World2Object[2].y;
  v_19.w = _World2Object[3].y;
  highp vec4 v_20;
  v_20.x = _World2Object[0].z;
  v_20.y = _World2Object[1].z;
  v_20.z = _World2Object[2].z;
  v_20.w = _World2Object[3].z;
  highp vec3 tmpvar_21;
  tmpvar_21 = normalize(((
    (v_18.xyz * norm_17.x)
   + 
    (v_19.xyz * norm_17.y)
  ) + (v_20.xyz * norm_17.z)));
  highp vec3 dir_22;
  dir_22 = tmpvar_4.xyz;
  highp mat3 tmpvar_23;
  tmpvar_23[0] = _Object2World[0].xyz;
  tmpvar_23[1] = _Object2World[1].xyz;
  tmpvar_23[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_24;
  tmpvar_24.xyz = normalize((tmpvar_23 * dir_22));
  tmpvar_24.w = tmpvar_4.w;
  mediump vec3 normal_25;
  normal_25 = tmpvar_21;
  mediump vec3 tangent_26;
  tangent_26 = tmpvar_24.xyz;
  mediump float tangentSign_27;
  tangentSign_27 = tmpvar_24.w;
  mediump float xlat_varsign_28;
  highp float tmpvar_29;
  tmpvar_29 = (tangentSign_27 * unity_WorldTransformParams.w);
  xlat_varsign_28 = tmpvar_29;
  mediump vec3 tmpvar_30;
  tmpvar_30 = (((normal_25.yzx * tangent_26.zxy) - (normal_25.zxy * tangent_26.yzx)) * xlat_varsign_28);
  mediump mat3 tmpvar_31;
  tmpvar_31[0].x = tangent_26.x;
  tmpvar_31[0].y = tmpvar_30.x;
  tmpvar_31[0].z = normal_25.x;
  tmpvar_31[1].x = tangent_26.y;
  tmpvar_31[1].y = tmpvar_30.y;
  tmpvar_31[1].z = normal_25.y;
  tmpvar_31[2].x = tangent_26.z;
  tmpvar_31[2].y = tmpvar_30.z;
  tmpvar_31[2].z = normal_25.z;
  tangentToWorld_6 = tmpvar_31;
  highp vec3 v_32;
  v_32.x = tangentToWorld_6[0].x;
  v_32.y = tangentToWorld_6[1].x;
  v_32.z = tangentToWorld_6[2].x;
  tmpvar_8.xyz = v_32;
  highp vec3 v_33;
  v_33.x = tangentToWorld_6[0].y;
  v_33.y = tangentToWorld_6[1].y;
  v_33.z = tangentToWorld_6[2].y;
  tmpvar_9.xyz = v_33;
  highp vec3 v_34;
  v_34.x = tangentToWorld_6[0].z;
  v_34.y = tangentToWorld_6[1].z;
  v_34.z = tangentToWorld_6[2].z;
  tmpvar_10.xyz = v_34;
  highp vec4 tmpvar_35;
  tmpvar_35 = (_Object2World * _glesVertex);
  tmpvar_11 = (_LightMatrix0 * tmpvar_35);
  tmpvar_12 = (unity_World2Shadow[0] * tmpvar_35);
  highp vec3 tmpvar_36;
  tmpvar_36 = (_WorldSpaceLightPos0.xyz - (tmpvar_13.xyz * _WorldSpaceLightPos0.w));
  mediump vec3 n_37;
  n_37 = tmpvar_36;
  mediump vec3 tmpvar_38;
  tmpvar_38 = normalize(n_37);
  lightDir_5 = tmpvar_38;
  tmpvar_8.w = lightDir_5.x;
  tmpvar_9.w = lightDir_5.y;
  tmpvar_10.w = lightDir_5.z;
  gl_Position = tmpvar_7;
  xlv_TEXCOORD0 = texcoord_14;
  xlv_TEXCOORD1 = normalize(n_16);
  xlv_TEXCOORD2 = tmpvar_8;
  xlv_TEXCOORD2_1 = tmpvar_9;
  xlv_TEXCOORD2_2 = tmpvar_10;
  xlv_TEXCOORD5 = tmpvar_11;
  xlv_TEXCOORD6 = tmpvar_12;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 _LightShadowData;
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform highp sampler2D _ShadowMapTexture;
uniform sampler2D _LightTexture0;
uniform sampler2D _LightTextureB0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  mediump vec3 tmpvar_4;
  tmpvar_4 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  tmpvar_3 = (tmpvar_2 * (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w)));
  mediump vec3 tmpvar_5;
  tmpvar_5 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_6;
  tmpvar_6.x = xlv_TEXCOORD2.w;
  tmpvar_6.y = xlv_TEXCOORD2_1.w;
  tmpvar_6.z = xlv_TEXCOORD2_2.w;
  lowp vec4 tmpvar_7;
  mediump vec2 P_8;
  P_8 = ((xlv_TEXCOORD5.xy / xlv_TEXCOORD5.w) + 0.5);
  tmpvar_7 = texture2D (_LightTexture0, P_8);
  highp vec3 LightCoord_9;
  LightCoord_9 = xlv_TEXCOORD5.xyz;
  highp float tmpvar_10;
  tmpvar_10 = dot (LightCoord_9, LightCoord_9);
  lowp vec4 tmpvar_11;
  tmpvar_11 = texture2D (_LightTextureB0, vec2(tmpvar_10));
  lowp float tmpvar_12;
  highp vec4 shadowCoord_13;
  shadowCoord_13 = xlv_TEXCOORD6;
  highp vec4 tmpvar_14;
  tmpvar_14 = texture2DProj (_ShadowMapTexture, shadowCoord_13);
  mediump float tmpvar_15;
  if ((tmpvar_14.x < (shadowCoord_13.z / shadowCoord_13.w))) {
    tmpvar_15 = _LightShadowData.x;
  } else {
    tmpvar_15 = 1.0;
  };
  tmpvar_12 = tmpvar_15;
  mediump vec3 tmpvar_16;
  tmpvar_16 = _LightColor0.xyz;
  mediump float tmpvar_17;
  tmpvar_17 = clamp (dot (tmpvar_5, tmpvar_6), 0.0, 1.0);
  tmpvar_16 = (tmpvar_16 * ((
    (float((xlv_TEXCOORD5.z > 0.0)) * tmpvar_7.w)
   * tmpvar_11.w) * tmpvar_12));
  mediump vec3 viewDir_18;
  viewDir_18 = -(xlv_TEXCOORD1);
  mediump float specularTerm_19;
  mediump float tmpvar_20;
  tmpvar_20 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_21;
  mediump vec3 inVec_22;
  inVec_22 = (tmpvar_6 + viewDir_18);
  tmpvar_21 = (inVec_22 * inversesqrt(max (0.001, 
    dot (inVec_22, inVec_22)
  )));
  mediump float tmpvar_23;
  tmpvar_23 = clamp (dot (tmpvar_5, tmpvar_21), 0.0, 1.0);
  mediump float tmpvar_24;
  tmpvar_24 = clamp (dot (tmpvar_5, viewDir_18), 0.0, 1.0);
  mediump float tmpvar_25;
  tmpvar_25 = clamp (dot (tmpvar_6, tmpvar_21), 0.0, 1.0);
  mediump float tmpvar_26;
  tmpvar_26 = (tmpvar_20 * tmpvar_20);
  mediump float tmpvar_27;
  tmpvar_27 = (tmpvar_20 * tmpvar_20);
  mediump float tmpvar_28;
  tmpvar_28 = (tmpvar_27 * tmpvar_27);
  mediump float tmpvar_29;
  tmpvar_29 = (((tmpvar_23 * tmpvar_23) * (tmpvar_28 - 1.0)) + 1.0);
  mediump float x_30;
  x_30 = (1.0 - tmpvar_17);
  mediump float x_31;
  x_31 = (1.0 - tmpvar_24);
  mediump float tmpvar_32;
  tmpvar_32 = (0.5 + ((2.0 * tmpvar_25) * (tmpvar_25 * tmpvar_20)));
  specularTerm_19 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_17) / ((
      (tmpvar_17 * ((tmpvar_24 * (1.0 - tmpvar_26)) + tmpvar_26))
     + 
      (tmpvar_24 * ((tmpvar_17 * (1.0 - tmpvar_26)) + tmpvar_26))
    ) + 1e-05)) * (tmpvar_28 / ((3.141593 * tmpvar_29) * tmpvar_29)))
   * 0.7853982)));
  mediump float tmpvar_33;
  tmpvar_33 = max (0.0, (specularTerm_19 * tmpvar_17));
  specularTerm_19 = tmpvar_33;
  mediump float x_34;
  x_34 = (1.0 - tmpvar_25);
  mediump vec4 tmpvar_35;
  tmpvar_35.w = 1.0;
  tmpvar_35.xyz = ((tmpvar_3 * (tmpvar_16 * 
    (((1.0 + (
      (tmpvar_32 - 1.0)
     * 
      ((x_30 * x_30) * ((x_30 * x_30) * x_30))
    )) * (1.0 + (
      (tmpvar_32 - 1.0)
     * 
      ((x_31 * x_31) * ((x_31 * x_31) * x_31))
    ))) * tmpvar_17)
  )) + ((tmpvar_33 * tmpvar_16) * (tmpvar_4 + 
    ((1.0 - tmpvar_4) * ((x_34 * x_34) * ((x_34 * x_34) * x_34)))
  )));
  mediump vec4 xlat_varoutput_36;
  xlat_varoutput_36.xyz = tmpvar_35.xyz;
  xlat_varoutput_36.w = 1.0;
  gl_FragData[0] = xlat_varoutput_36;
}


#endif
"
}
SubProgram "gles " {
Keywords { "SPOT" "SHADOWS_DEPTH" "SHADOWS_NATIVE" }
"#version 100

#ifdef VERTEX
#extension GL_EXT_shadow_samplers : enable
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _WorldSpaceLightPos0;
uniform highp mat4 unity_World2Shadow[4];
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
uniform mediump mat4 _LightMatrix0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp vec3 lightDir_5;
  highp mat3 tangentToWorld_6;
  highp vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  mediump vec4 tmpvar_10;
  mediump vec4 tmpvar_11;
  mediump vec4 tmpvar_12;
  highp vec4 tmpvar_13;
  tmpvar_13 = (_Object2World * _glesVertex);
  tmpvar_7 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_14;
  texcoord_14.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_15;
  if ((_UVSec == 0.0)) {
    tmpvar_15 = tmpvar_2;
  } else {
    tmpvar_15 = tmpvar_3;
  };
  texcoord_14.zw = ((tmpvar_15 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_16;
  n_16 = (tmpvar_13.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_17;
  norm_17 = tmpvar_1;
  highp vec4 v_18;
  v_18.x = _World2Object[0].x;
  v_18.y = _World2Object[1].x;
  v_18.z = _World2Object[2].x;
  v_18.w = _World2Object[3].x;
  highp vec4 v_19;
  v_19.x = _World2Object[0].y;
  v_19.y = _World2Object[1].y;
  v_19.z = _World2Object[2].y;
  v_19.w = _World2Object[3].y;
  highp vec4 v_20;
  v_20.x = _World2Object[0].z;
  v_20.y = _World2Object[1].z;
  v_20.z = _World2Object[2].z;
  v_20.w = _World2Object[3].z;
  highp vec3 tmpvar_21;
  tmpvar_21 = normalize(((
    (v_18.xyz * norm_17.x)
   + 
    (v_19.xyz * norm_17.y)
  ) + (v_20.xyz * norm_17.z)));
  highp vec3 dir_22;
  dir_22 = tmpvar_4.xyz;
  highp mat3 tmpvar_23;
  tmpvar_23[0] = _Object2World[0].xyz;
  tmpvar_23[1] = _Object2World[1].xyz;
  tmpvar_23[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_24;
  tmpvar_24.xyz = normalize((tmpvar_23 * dir_22));
  tmpvar_24.w = tmpvar_4.w;
  mediump vec3 normal_25;
  normal_25 = tmpvar_21;
  mediump vec3 tangent_26;
  tangent_26 = tmpvar_24.xyz;
  mediump float tangentSign_27;
  tangentSign_27 = tmpvar_24.w;
  mediump float xlat_varsign_28;
  highp float tmpvar_29;
  tmpvar_29 = (tangentSign_27 * unity_WorldTransformParams.w);
  xlat_varsign_28 = tmpvar_29;
  mediump vec3 tmpvar_30;
  tmpvar_30 = (((normal_25.yzx * tangent_26.zxy) - (normal_25.zxy * tangent_26.yzx)) * xlat_varsign_28);
  mediump mat3 tmpvar_31;
  tmpvar_31[0].x = tangent_26.x;
  tmpvar_31[0].y = tmpvar_30.x;
  tmpvar_31[0].z = normal_25.x;
  tmpvar_31[1].x = tangent_26.y;
  tmpvar_31[1].y = tmpvar_30.y;
  tmpvar_31[1].z = normal_25.y;
  tmpvar_31[2].x = tangent_26.z;
  tmpvar_31[2].y = tmpvar_30.z;
  tmpvar_31[2].z = normal_25.z;
  tangentToWorld_6 = tmpvar_31;
  highp vec3 v_32;
  v_32.x = tangentToWorld_6[0].x;
  v_32.y = tangentToWorld_6[1].x;
  v_32.z = tangentToWorld_6[2].x;
  tmpvar_8.xyz = v_32;
  highp vec3 v_33;
  v_33.x = tangentToWorld_6[0].y;
  v_33.y = tangentToWorld_6[1].y;
  v_33.z = tangentToWorld_6[2].y;
  tmpvar_9.xyz = v_33;
  highp vec3 v_34;
  v_34.x = tangentToWorld_6[0].z;
  v_34.y = tangentToWorld_6[1].z;
  v_34.z = tangentToWorld_6[2].z;
  tmpvar_10.xyz = v_34;
  highp vec4 tmpvar_35;
  tmpvar_35 = (_Object2World * _glesVertex);
  tmpvar_11 = (_LightMatrix0 * tmpvar_35);
  tmpvar_12 = (unity_World2Shadow[0] * tmpvar_35);
  highp vec3 tmpvar_36;
  tmpvar_36 = (_WorldSpaceLightPos0.xyz - (tmpvar_13.xyz * _WorldSpaceLightPos0.w));
  mediump vec3 n_37;
  n_37 = tmpvar_36;
  mediump vec3 tmpvar_38;
  tmpvar_38 = normalize(n_37);
  lightDir_5 = tmpvar_38;
  tmpvar_8.w = lightDir_5.x;
  tmpvar_9.w = lightDir_5.y;
  tmpvar_10.w = lightDir_5.z;
  gl_Position = tmpvar_7;
  xlv_TEXCOORD0 = texcoord_14;
  xlv_TEXCOORD1 = normalize(n_16);
  xlv_TEXCOORD2 = tmpvar_8;
  xlv_TEXCOORD2_1 = tmpvar_9;
  xlv_TEXCOORD2_2 = tmpvar_10;
  xlv_TEXCOORD5 = tmpvar_11;
  xlv_TEXCOORD6 = tmpvar_12;
}


#endif
#ifdef FRAGMENT
#extension GL_EXT_shadow_samplers : enable
uniform mediump vec4 _LightShadowData;
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform lowp sampler2DShadow _ShadowMapTexture;
uniform sampler2D _LightTexture0;
uniform sampler2D _LightTextureB0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  tmpvar_3 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  mediump vec3 tmpvar_4;
  tmpvar_4 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_5;
  tmpvar_5.x = xlv_TEXCOORD2.w;
  tmpvar_5.y = xlv_TEXCOORD2_1.w;
  tmpvar_5.z = xlv_TEXCOORD2_2.w;
  lowp vec4 tmpvar_6;
  mediump vec2 P_7;
  P_7 = ((xlv_TEXCOORD5.xy / xlv_TEXCOORD5.w) + 0.5);
  tmpvar_6 = texture2D (_LightTexture0, P_7);
  mediump float tmpvar_8;
  tmpvar_8 = dot (xlv_TEXCOORD5.xyz, xlv_TEXCOORD5.xyz);
  lowp vec4 tmpvar_9;
  tmpvar_9 = texture2D (_LightTextureB0, vec2(tmpvar_8));
  lowp float tmpvar_10;
  highp vec4 shadowCoord_11;
  shadowCoord_11 = xlv_TEXCOORD6;
  mediump float shadow_12;
  lowp float tmpvar_13;
  tmpvar_13 = shadow2DProjEXT (_ShadowMapTexture, shadowCoord_11);
  mediump float tmpvar_14;
  tmpvar_14 = tmpvar_13;
  shadow_12 = (_LightShadowData.x + (tmpvar_14 * (1.0 - _LightShadowData.x)));
  tmpvar_10 = shadow_12;
  mediump vec3 tmpvar_15;
  tmpvar_15 = _LightColor0.xyz;
  mediump float tmpvar_16;
  tmpvar_16 = clamp (dot (tmpvar_4, tmpvar_5), 0.0, 1.0);
  tmpvar_15 = (tmpvar_15 * ((
    (float((xlv_TEXCOORD5.z > 0.0)) * tmpvar_6.w)
   * tmpvar_9.w) * tmpvar_10));
  mediump vec3 viewDir_17;
  viewDir_17 = -(xlv_TEXCOORD1);
  mediump float specularTerm_18;
  mediump float tmpvar_19;
  tmpvar_19 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_20;
  mediump vec3 inVec_21;
  inVec_21 = (tmpvar_5 + viewDir_17);
  tmpvar_20 = (inVec_21 * inversesqrt(max (0.001, 
    dot (inVec_21, inVec_21)
  )));
  mediump float tmpvar_22;
  tmpvar_22 = clamp (dot (tmpvar_4, tmpvar_20), 0.0, 1.0);
  mediump float tmpvar_23;
  tmpvar_23 = clamp (dot (tmpvar_4, viewDir_17), 0.0, 1.0);
  mediump float tmpvar_24;
  tmpvar_24 = clamp (dot (tmpvar_5, tmpvar_20), 0.0, 1.0);
  mediump float tmpvar_25;
  tmpvar_25 = (tmpvar_19 * tmpvar_19);
  mediump float tmpvar_26;
  tmpvar_26 = (tmpvar_19 * tmpvar_19);
  mediump float tmpvar_27;
  tmpvar_27 = (tmpvar_26 * tmpvar_26);
  mediump float tmpvar_28;
  tmpvar_28 = (((tmpvar_22 * tmpvar_22) * (tmpvar_27 - 1.0)) + 1.0);
  mediump float x_29;
  x_29 = (1.0 - tmpvar_16);
  mediump float x_30;
  x_30 = (1.0 - tmpvar_23);
  mediump float tmpvar_31;
  tmpvar_31 = (0.5 + ((2.0 * tmpvar_24) * (tmpvar_24 * tmpvar_19)));
  specularTerm_18 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_16) / ((
      (tmpvar_16 * ((tmpvar_23 * (1.0 - tmpvar_25)) + tmpvar_25))
     + 
      (tmpvar_23 * ((tmpvar_16 * (1.0 - tmpvar_25)) + tmpvar_25))
    ) + 1e-05)) * (tmpvar_27 / ((3.141593 * tmpvar_28) * tmpvar_28)))
   * 0.7853982)));
  mediump float tmpvar_32;
  tmpvar_32 = max (0.0, (specularTerm_18 * tmpvar_16));
  specularTerm_18 = tmpvar_32;
  mediump float x_33;
  x_33 = (1.0 - tmpvar_24);
  mediump vec4 tmpvar_34;
  tmpvar_34.w = 1.0;
  tmpvar_34.xyz = (((tmpvar_2 * 
    (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w))
  ) * (tmpvar_15 * 
    (((1.0 + (
      (tmpvar_31 - 1.0)
     * 
      ((x_29 * x_29) * ((x_29 * x_29) * x_29))
    )) * (1.0 + (
      (tmpvar_31 - 1.0)
     * 
      ((x_30 * x_30) * ((x_30 * x_30) * x_30))
    ))) * tmpvar_16)
  )) + ((tmpvar_32 * tmpvar_15) * (tmpvar_3 + 
    ((1.0 - tmpvar_3) * ((x_33 * x_33) * ((x_33 * x_33) * x_33)))
  )));
  mediump vec4 xlat_varoutput_35;
  xlat_varoutput_35.xyz = tmpvar_34.xyz;
  xlat_varoutput_35.w = 1.0;
  gl_FragData[0] = xlat_varoutput_35;
}


#endif
"
}
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _ProjectionParams;
uniform mediump vec4 _WorldSpaceLightPos0;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp mat3 tangentToWorld_5;
  highp vec4 tmpvar_6;
  mediump vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  mediump vec4 tmpvar_10;
  highp vec4 tmpvar_11;
  tmpvar_11 = (_Object2World * _glesVertex);
  tmpvar_6 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_12;
  texcoord_12.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_13;
  if ((_UVSec == 0.0)) {
    tmpvar_13 = tmpvar_2;
  } else {
    tmpvar_13 = tmpvar_3;
  };
  texcoord_12.zw = ((tmpvar_13 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_14;
  n_14 = (tmpvar_11.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_15;
  norm_15 = tmpvar_1;
  highp vec4 v_16;
  v_16.x = _World2Object[0].x;
  v_16.y = _World2Object[1].x;
  v_16.z = _World2Object[2].x;
  v_16.w = _World2Object[3].x;
  highp vec4 v_17;
  v_17.x = _World2Object[0].y;
  v_17.y = _World2Object[1].y;
  v_17.z = _World2Object[2].y;
  v_17.w = _World2Object[3].y;
  highp vec4 v_18;
  v_18.x = _World2Object[0].z;
  v_18.y = _World2Object[1].z;
  v_18.z = _World2Object[2].z;
  v_18.w = _World2Object[3].z;
  highp vec3 tmpvar_19;
  tmpvar_19 = normalize(((
    (v_16.xyz * norm_15.x)
   + 
    (v_17.xyz * norm_15.y)
  ) + (v_18.xyz * norm_15.z)));
  highp vec3 dir_20;
  dir_20 = tmpvar_4.xyz;
  highp mat3 tmpvar_21;
  tmpvar_21[0] = _Object2World[0].xyz;
  tmpvar_21[1] = _Object2World[1].xyz;
  tmpvar_21[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_22;
  tmpvar_22.xyz = normalize((tmpvar_21 * dir_20));
  tmpvar_22.w = tmpvar_4.w;
  mediump vec3 normal_23;
  normal_23 = tmpvar_19;
  mediump vec3 tangent_24;
  tangent_24 = tmpvar_22.xyz;
  mediump float tangentSign_25;
  tangentSign_25 = tmpvar_22.w;
  mediump float xlat_varsign_26;
  highp float tmpvar_27;
  tmpvar_27 = (tangentSign_25 * unity_WorldTransformParams.w);
  xlat_varsign_26 = tmpvar_27;
  mediump vec3 tmpvar_28;
  tmpvar_28 = (((normal_23.yzx * tangent_24.zxy) - (normal_23.zxy * tangent_24.yzx)) * xlat_varsign_26);
  mediump mat3 tmpvar_29;
  tmpvar_29[0].x = tangent_24.x;
  tmpvar_29[0].y = tmpvar_28.x;
  tmpvar_29[0].z = normal_23.x;
  tmpvar_29[1].x = tangent_24.y;
  tmpvar_29[1].y = tmpvar_28.y;
  tmpvar_29[1].z = normal_23.y;
  tmpvar_29[2].x = tangent_24.z;
  tmpvar_29[2].y = tmpvar_28.z;
  tmpvar_29[2].z = normal_23.z;
  tangentToWorld_5 = tmpvar_29;
  highp vec3 v_30;
  v_30.x = tangentToWorld_5[0].x;
  v_30.y = tangentToWorld_5[1].x;
  v_30.z = tangentToWorld_5[2].x;
  tmpvar_7.xyz = v_30;
  highp vec3 v_31;
  v_31.x = tangentToWorld_5[0].y;
  v_31.y = tangentToWorld_5[1].y;
  v_31.z = tangentToWorld_5[2].y;
  tmpvar_8.xyz = v_31;
  highp vec3 v_32;
  v_32.x = tangentToWorld_5[0].z;
  v_32.y = tangentToWorld_5[1].z;
  v_32.z = tangentToWorld_5[2].z;
  tmpvar_9.xyz = v_32;
  highp vec4 o_33;
  highp vec4 tmpvar_34;
  tmpvar_34 = (tmpvar_6 * 0.5);
  highp vec2 tmpvar_35;
  tmpvar_35.x = tmpvar_34.x;
  tmpvar_35.y = (tmpvar_34.y * _ProjectionParams.x);
  o_33.xy = (tmpvar_35 + tmpvar_34.w);
  o_33.zw = tmpvar_6.zw;
  tmpvar_10 = o_33;
  highp vec3 tmpvar_36;
  tmpvar_36 = (_WorldSpaceLightPos0.xyz - (tmpvar_11.xyz * _WorldSpaceLightPos0.w));
  tmpvar_7.w = tmpvar_36.x;
  tmpvar_8.w = tmpvar_36.y;
  tmpvar_9.w = tmpvar_36.z;
  gl_Position = tmpvar_6;
  xlv_TEXCOORD0 = texcoord_12;
  xlv_TEXCOORD1 = normalize(n_14);
  xlv_TEXCOORD2 = tmpvar_7;
  xlv_TEXCOORD2_1 = tmpvar_8;
  xlv_TEXCOORD2_2 = tmpvar_9;
  xlv_TEXCOORD5 = tmpvar_10;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform sampler2D _ShadowMapTexture;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying mediump vec4 xlv_TEXCOORD5;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  tmpvar_3 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  mediump vec3 tmpvar_4;
  tmpvar_4 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_5;
  tmpvar_5.x = xlv_TEXCOORD2.w;
  tmpvar_5.y = xlv_TEXCOORD2_1.w;
  tmpvar_5.z = xlv_TEXCOORD2_2.w;
  lowp float tmpvar_6;
  tmpvar_6 = texture2DProj (_ShadowMapTexture, xlv_TEXCOORD5).x;
  mediump float atten_7;
  atten_7 = tmpvar_6;
  mediump vec3 tmpvar_8;
  tmpvar_8 = _LightColor0.xyz;
  mediump float tmpvar_9;
  tmpvar_9 = clamp (dot (tmpvar_4, tmpvar_5), 0.0, 1.0);
  tmpvar_8 = (tmpvar_8 * atten_7);
  mediump vec3 viewDir_10;
  viewDir_10 = -(xlv_TEXCOORD1);
  mediump float specularTerm_11;
  mediump float tmpvar_12;
  tmpvar_12 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_13;
  mediump vec3 inVec_14;
  inVec_14 = (tmpvar_5 + viewDir_10);
  tmpvar_13 = (inVec_14 * inversesqrt(max (0.001, 
    dot (inVec_14, inVec_14)
  )));
  mediump float tmpvar_15;
  tmpvar_15 = clamp (dot (tmpvar_4, tmpvar_13), 0.0, 1.0);
  mediump float tmpvar_16;
  tmpvar_16 = clamp (dot (tmpvar_4, viewDir_10), 0.0, 1.0);
  mediump float tmpvar_17;
  tmpvar_17 = clamp (dot (tmpvar_5, tmpvar_13), 0.0, 1.0);
  mediump float tmpvar_18;
  tmpvar_18 = (tmpvar_12 * tmpvar_12);
  mediump float tmpvar_19;
  tmpvar_19 = (tmpvar_12 * tmpvar_12);
  mediump float tmpvar_20;
  tmpvar_20 = (tmpvar_19 * tmpvar_19);
  mediump float tmpvar_21;
  tmpvar_21 = (((tmpvar_15 * tmpvar_15) * (tmpvar_20 - 1.0)) + 1.0);
  mediump float x_22;
  x_22 = (1.0 - tmpvar_9);
  mediump float x_23;
  x_23 = (1.0 - tmpvar_16);
  mediump float tmpvar_24;
  tmpvar_24 = (0.5 + ((2.0 * tmpvar_17) * (tmpvar_17 * tmpvar_12)));
  specularTerm_11 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_9) / ((
      (tmpvar_9 * ((tmpvar_16 * (1.0 - tmpvar_18)) + tmpvar_18))
     + 
      (tmpvar_16 * ((tmpvar_9 * (1.0 - tmpvar_18)) + tmpvar_18))
    ) + 1e-05)) * (tmpvar_20 / ((3.141593 * tmpvar_21) * tmpvar_21)))
   * 0.7853982)));
  mediump float tmpvar_25;
  tmpvar_25 = max (0.0, (specularTerm_11 * tmpvar_9));
  specularTerm_11 = tmpvar_25;
  mediump float x_26;
  x_26 = (1.0 - tmpvar_17);
  mediump vec4 tmpvar_27;
  tmpvar_27.w = 1.0;
  tmpvar_27.xyz = (((tmpvar_2 * 
    (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w))
  ) * (tmpvar_8 * 
    (((1.0 + (
      (tmpvar_24 - 1.0)
     * 
      ((x_22 * x_22) * ((x_22 * x_22) * x_22))
    )) * (1.0 + (
      (tmpvar_24 - 1.0)
     * 
      ((x_23 * x_23) * ((x_23 * x_23) * x_23))
    ))) * tmpvar_9)
  )) + ((tmpvar_25 * tmpvar_8) * (tmpvar_3 + 
    ((1.0 - tmpvar_3) * ((x_26 * x_26) * ((x_26 * x_26) * x_26)))
  )));
  mediump vec4 xlat_varoutput_28;
  xlat_varoutput_28.xyz = tmpvar_27.xyz;
  xlat_varoutput_28.w = 1.0;
  gl_FragData[0] = xlat_varoutput_28;
}


#endif
"
}
SubProgram "gles " {
Keywords { "DIRECTIONAL_COOKIE" "SHADOWS_SCREEN" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _ProjectionParams;
uniform mediump vec4 _WorldSpaceLightPos0;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
uniform mediump mat4 _LightMatrix0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec2 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp mat3 tangentToWorld_5;
  highp vec4 tmpvar_6;
  mediump vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  mediump vec4 tmpvar_10;
  highp vec4 tmpvar_11;
  tmpvar_11 = (_Object2World * _glesVertex);
  tmpvar_6 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_12;
  texcoord_12.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_13;
  if ((_UVSec == 0.0)) {
    tmpvar_13 = tmpvar_2;
  } else {
    tmpvar_13 = tmpvar_3;
  };
  texcoord_12.zw = ((tmpvar_13 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_14;
  n_14 = (tmpvar_11.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_15;
  norm_15 = tmpvar_1;
  highp vec4 v_16;
  v_16.x = _World2Object[0].x;
  v_16.y = _World2Object[1].x;
  v_16.z = _World2Object[2].x;
  v_16.w = _World2Object[3].x;
  highp vec4 v_17;
  v_17.x = _World2Object[0].y;
  v_17.y = _World2Object[1].y;
  v_17.z = _World2Object[2].y;
  v_17.w = _World2Object[3].y;
  highp vec4 v_18;
  v_18.x = _World2Object[0].z;
  v_18.y = _World2Object[1].z;
  v_18.z = _World2Object[2].z;
  v_18.w = _World2Object[3].z;
  highp vec3 tmpvar_19;
  tmpvar_19 = normalize(((
    (v_16.xyz * norm_15.x)
   + 
    (v_17.xyz * norm_15.y)
  ) + (v_18.xyz * norm_15.z)));
  highp vec3 dir_20;
  dir_20 = tmpvar_4.xyz;
  highp mat3 tmpvar_21;
  tmpvar_21[0] = _Object2World[0].xyz;
  tmpvar_21[1] = _Object2World[1].xyz;
  tmpvar_21[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_22;
  tmpvar_22.xyz = normalize((tmpvar_21 * dir_20));
  tmpvar_22.w = tmpvar_4.w;
  mediump vec3 normal_23;
  normal_23 = tmpvar_19;
  mediump vec3 tangent_24;
  tangent_24 = tmpvar_22.xyz;
  mediump float tangentSign_25;
  tangentSign_25 = tmpvar_22.w;
  mediump float xlat_varsign_26;
  highp float tmpvar_27;
  tmpvar_27 = (tangentSign_25 * unity_WorldTransformParams.w);
  xlat_varsign_26 = tmpvar_27;
  mediump vec3 tmpvar_28;
  tmpvar_28 = (((normal_23.yzx * tangent_24.zxy) - (normal_23.zxy * tangent_24.yzx)) * xlat_varsign_26);
  mediump mat3 tmpvar_29;
  tmpvar_29[0].x = tangent_24.x;
  tmpvar_29[0].y = tmpvar_28.x;
  tmpvar_29[0].z = normal_23.x;
  tmpvar_29[1].x = tangent_24.y;
  tmpvar_29[1].y = tmpvar_28.y;
  tmpvar_29[1].z = normal_23.y;
  tmpvar_29[2].x = tangent_24.z;
  tmpvar_29[2].y = tmpvar_28.z;
  tmpvar_29[2].z = normal_23.z;
  tangentToWorld_5 = tmpvar_29;
  highp vec3 v_30;
  v_30.x = tangentToWorld_5[0].x;
  v_30.y = tangentToWorld_5[1].x;
  v_30.z = tangentToWorld_5[2].x;
  tmpvar_7.xyz = v_30;
  highp vec3 v_31;
  v_31.x = tangentToWorld_5[0].y;
  v_31.y = tangentToWorld_5[1].y;
  v_31.z = tangentToWorld_5[2].y;
  tmpvar_8.xyz = v_31;
  highp vec3 v_32;
  v_32.x = tangentToWorld_5[0].z;
  v_32.y = tangentToWorld_5[1].z;
  v_32.z = tangentToWorld_5[2].z;
  tmpvar_9.xyz = v_32;
  highp vec4 o_33;
  highp vec4 tmpvar_34;
  tmpvar_34 = (tmpvar_6 * 0.5);
  highp vec2 tmpvar_35;
  tmpvar_35.x = tmpvar_34.x;
  tmpvar_35.y = (tmpvar_34.y * _ProjectionParams.x);
  o_33.xy = (tmpvar_35 + tmpvar_34.w);
  o_33.zw = tmpvar_6.zw;
  tmpvar_10 = o_33;
  highp vec3 tmpvar_36;
  tmpvar_36 = (_WorldSpaceLightPos0.xyz - (tmpvar_11.xyz * _WorldSpaceLightPos0.w));
  tmpvar_7.w = tmpvar_36.x;
  tmpvar_8.w = tmpvar_36.y;
  tmpvar_9.w = tmpvar_36.z;
  gl_Position = tmpvar_6;
  xlv_TEXCOORD0 = texcoord_12;
  xlv_TEXCOORD1 = normalize(n_14);
  xlv_TEXCOORD2 = tmpvar_7;
  xlv_TEXCOORD2_1 = tmpvar_8;
  xlv_TEXCOORD2_2 = tmpvar_9;
  xlv_TEXCOORD5 = (_LightMatrix0 * (_Object2World * _glesVertex)).xy;
  xlv_TEXCOORD6 = tmpvar_10;
}


#endif
#ifdef FRAGMENT
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform sampler2D _ShadowMapTexture;
uniform sampler2D _LightTexture0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec2 xlv_TEXCOORD5;
varying mediump vec4 xlv_TEXCOORD6;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  tmpvar_3 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  mediump vec3 tmpvar_4;
  tmpvar_4 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_5;
  tmpvar_5.x = xlv_TEXCOORD2.w;
  tmpvar_5.y = xlv_TEXCOORD2_1.w;
  tmpvar_5.z = xlv_TEXCOORD2_2.w;
  lowp vec4 tmpvar_6;
  tmpvar_6 = texture2D (_LightTexture0, xlv_TEXCOORD5);
  lowp vec4 tmpvar_7;
  tmpvar_7 = texture2DProj (_ShadowMapTexture, xlv_TEXCOORD6);
  mediump float atten_8;
  atten_8 = (tmpvar_6.w * tmpvar_7.x);
  mediump vec3 tmpvar_9;
  tmpvar_9 = _LightColor0.xyz;
  mediump float tmpvar_10;
  tmpvar_10 = clamp (dot (tmpvar_4, tmpvar_5), 0.0, 1.0);
  tmpvar_9 = (tmpvar_9 * atten_8);
  mediump vec3 viewDir_11;
  viewDir_11 = -(xlv_TEXCOORD1);
  mediump float specularTerm_12;
  mediump float tmpvar_13;
  tmpvar_13 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_14;
  mediump vec3 inVec_15;
  inVec_15 = (tmpvar_5 + viewDir_11);
  tmpvar_14 = (inVec_15 * inversesqrt(max (0.001, 
    dot (inVec_15, inVec_15)
  )));
  mediump float tmpvar_16;
  tmpvar_16 = clamp (dot (tmpvar_4, tmpvar_14), 0.0, 1.0);
  mediump float tmpvar_17;
  tmpvar_17 = clamp (dot (tmpvar_4, viewDir_11), 0.0, 1.0);
  mediump float tmpvar_18;
  tmpvar_18 = clamp (dot (tmpvar_5, tmpvar_14), 0.0, 1.0);
  mediump float tmpvar_19;
  tmpvar_19 = (tmpvar_13 * tmpvar_13);
  mediump float tmpvar_20;
  tmpvar_20 = (tmpvar_13 * tmpvar_13);
  mediump float tmpvar_21;
  tmpvar_21 = (tmpvar_20 * tmpvar_20);
  mediump float tmpvar_22;
  tmpvar_22 = (((tmpvar_16 * tmpvar_16) * (tmpvar_21 - 1.0)) + 1.0);
  mediump float x_23;
  x_23 = (1.0 - tmpvar_10);
  mediump float x_24;
  x_24 = (1.0 - tmpvar_17);
  mediump float tmpvar_25;
  tmpvar_25 = (0.5 + ((2.0 * tmpvar_18) * (tmpvar_18 * tmpvar_13)));
  specularTerm_12 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_10) / ((
      (tmpvar_10 * ((tmpvar_17 * (1.0 - tmpvar_19)) + tmpvar_19))
     + 
      (tmpvar_17 * ((tmpvar_10 * (1.0 - tmpvar_19)) + tmpvar_19))
    ) + 1e-05)) * (tmpvar_21 / ((3.141593 * tmpvar_22) * tmpvar_22)))
   * 0.7853982)));
  mediump float tmpvar_26;
  tmpvar_26 = max (0.0, (specularTerm_12 * tmpvar_10));
  specularTerm_12 = tmpvar_26;
  mediump float x_27;
  x_27 = (1.0 - tmpvar_18);
  mediump vec4 tmpvar_28;
  tmpvar_28.w = 1.0;
  tmpvar_28.xyz = (((tmpvar_2 * 
    (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w))
  ) * (tmpvar_9 * 
    (((1.0 + (
      (tmpvar_25 - 1.0)
     * 
      ((x_23 * x_23) * ((x_23 * x_23) * x_23))
    )) * (1.0 + (
      (tmpvar_25 - 1.0)
     * 
      ((x_24 * x_24) * ((x_24 * x_24) * x_24))
    ))) * tmpvar_10)
  )) + ((tmpvar_26 * tmpvar_9) * (tmpvar_3 + 
    ((1.0 - tmpvar_3) * ((x_27 * x_27) * ((x_27 * x_27) * x_27)))
  )));
  mediump vec4 xlat_varoutput_29;
  xlat_varoutput_29.xyz = tmpvar_28.xyz;
  xlat_varoutput_29.w = 1.0;
  gl_FragData[0] = xlat_varoutput_29;
}


#endif
"
}
SubProgram "gles " {
Keywords { "POINT" "SHADOWS_CUBE" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _WorldSpaceLightPos0;
uniform highp vec4 _LightPositionRange;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
uniform mediump mat4 _LightMatrix0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec3 xlv_TEXCOORD5;
varying highp vec3 xlv_TEXCOORD6;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp vec3 lightDir_5;
  highp mat3 tangentToWorld_6;
  highp vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  mediump vec4 tmpvar_10;
  highp vec4 tmpvar_11;
  tmpvar_11 = (_Object2World * _glesVertex);
  tmpvar_7 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_12;
  texcoord_12.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_13;
  if ((_UVSec == 0.0)) {
    tmpvar_13 = tmpvar_2;
  } else {
    tmpvar_13 = tmpvar_3;
  };
  texcoord_12.zw = ((tmpvar_13 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_14;
  n_14 = (tmpvar_11.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_15;
  norm_15 = tmpvar_1;
  highp vec4 v_16;
  v_16.x = _World2Object[0].x;
  v_16.y = _World2Object[1].x;
  v_16.z = _World2Object[2].x;
  v_16.w = _World2Object[3].x;
  highp vec4 v_17;
  v_17.x = _World2Object[0].y;
  v_17.y = _World2Object[1].y;
  v_17.z = _World2Object[2].y;
  v_17.w = _World2Object[3].y;
  highp vec4 v_18;
  v_18.x = _World2Object[0].z;
  v_18.y = _World2Object[1].z;
  v_18.z = _World2Object[2].z;
  v_18.w = _World2Object[3].z;
  highp vec3 tmpvar_19;
  tmpvar_19 = normalize(((
    (v_16.xyz * norm_15.x)
   + 
    (v_17.xyz * norm_15.y)
  ) + (v_18.xyz * norm_15.z)));
  highp vec3 dir_20;
  dir_20 = tmpvar_4.xyz;
  highp mat3 tmpvar_21;
  tmpvar_21[0] = _Object2World[0].xyz;
  tmpvar_21[1] = _Object2World[1].xyz;
  tmpvar_21[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_22;
  tmpvar_22.xyz = normalize((tmpvar_21 * dir_20));
  tmpvar_22.w = tmpvar_4.w;
  mediump vec3 normal_23;
  normal_23 = tmpvar_19;
  mediump vec3 tangent_24;
  tangent_24 = tmpvar_22.xyz;
  mediump float tangentSign_25;
  tangentSign_25 = tmpvar_22.w;
  mediump float xlat_varsign_26;
  highp float tmpvar_27;
  tmpvar_27 = (tangentSign_25 * unity_WorldTransformParams.w);
  xlat_varsign_26 = tmpvar_27;
  mediump vec3 tmpvar_28;
  tmpvar_28 = (((normal_23.yzx * tangent_24.zxy) - (normal_23.zxy * tangent_24.yzx)) * xlat_varsign_26);
  mediump mat3 tmpvar_29;
  tmpvar_29[0].x = tangent_24.x;
  tmpvar_29[0].y = tmpvar_28.x;
  tmpvar_29[0].z = normal_23.x;
  tmpvar_29[1].x = tangent_24.y;
  tmpvar_29[1].y = tmpvar_28.y;
  tmpvar_29[1].z = normal_23.y;
  tmpvar_29[2].x = tangent_24.z;
  tmpvar_29[2].y = tmpvar_28.z;
  tmpvar_29[2].z = normal_23.z;
  tangentToWorld_6 = tmpvar_29;
  highp vec3 v_30;
  v_30.x = tangentToWorld_6[0].x;
  v_30.y = tangentToWorld_6[1].x;
  v_30.z = tangentToWorld_6[2].x;
  tmpvar_8.xyz = v_30;
  highp vec3 v_31;
  v_31.x = tangentToWorld_6[0].y;
  v_31.y = tangentToWorld_6[1].y;
  v_31.z = tangentToWorld_6[2].y;
  tmpvar_9.xyz = v_31;
  highp vec3 v_32;
  v_32.x = tangentToWorld_6[0].z;
  v_32.y = tangentToWorld_6[1].z;
  v_32.z = tangentToWorld_6[2].z;
  tmpvar_10.xyz = v_32;
  highp vec3 tmpvar_33;
  tmpvar_33 = (_WorldSpaceLightPos0.xyz - (tmpvar_11.xyz * _WorldSpaceLightPos0.w));
  mediump vec3 n_34;
  n_34 = tmpvar_33;
  mediump vec3 tmpvar_35;
  tmpvar_35 = normalize(n_34);
  lightDir_5 = tmpvar_35;
  tmpvar_8.w = lightDir_5.x;
  tmpvar_9.w = lightDir_5.y;
  tmpvar_10.w = lightDir_5.z;
  gl_Position = tmpvar_7;
  xlv_TEXCOORD0 = texcoord_12;
  xlv_TEXCOORD1 = normalize(n_14);
  xlv_TEXCOORD2 = tmpvar_8;
  xlv_TEXCOORD2_1 = tmpvar_9;
  xlv_TEXCOORD2_2 = tmpvar_10;
  highp vec4 tmpvar_36;
  tmpvar_36 = (_Object2World * _glesVertex);
  xlv_TEXCOORD5 = (_LightMatrix0 * tmpvar_36).xyz;
  xlv_TEXCOORD6 = (tmpvar_36.xyz - _LightPositionRange.xyz);
}


#endif
#ifdef FRAGMENT
uniform highp vec4 _LightPositionRange;
uniform mediump vec4 _LightShadowData;
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform highp samplerCube _ShadowMapTexture;
uniform sampler2D _LightTexture0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec3 xlv_TEXCOORD5;
varying highp vec3 xlv_TEXCOORD6;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  mediump vec3 tmpvar_4;
  tmpvar_4 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  tmpvar_3 = (tmpvar_2 * (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w)));
  mediump vec3 tmpvar_5;
  tmpvar_5 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_6;
  tmpvar_6.x = xlv_TEXCOORD2.w;
  tmpvar_6.y = xlv_TEXCOORD2_1.w;
  tmpvar_6.z = xlv_TEXCOORD2_2.w;
  highp float tmpvar_7;
  tmpvar_7 = dot (xlv_TEXCOORD5, xlv_TEXCOORD5);
  lowp vec4 tmpvar_8;
  tmpvar_8 = texture2D (_LightTexture0, vec2(tmpvar_7));
  highp float mydist_9;
  mydist_9 = ((sqrt(
    dot (xlv_TEXCOORD6, xlv_TEXCOORD6)
  ) * _LightPositionRange.w) * 0.97);
  highp float tmpvar_10;
  tmpvar_10 = dot (textureCube (_ShadowMapTexture, xlv_TEXCOORD6), vec4(1.0, 0.003921569, 1.53787e-05, 6.030863e-08));
  mediump float tmpvar_11;
  if ((tmpvar_10 < mydist_9)) {
    tmpvar_11 = _LightShadowData.x;
  } else {
    tmpvar_11 = 1.0;
  };
  mediump vec3 tmpvar_12;
  tmpvar_12 = _LightColor0.xyz;
  mediump float tmpvar_13;
  tmpvar_13 = clamp (dot (tmpvar_5, tmpvar_6), 0.0, 1.0);
  tmpvar_12 = (tmpvar_12 * (tmpvar_8.w * tmpvar_11));
  mediump vec3 viewDir_14;
  viewDir_14 = -(xlv_TEXCOORD1);
  mediump float specularTerm_15;
  mediump float tmpvar_16;
  tmpvar_16 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_17;
  mediump vec3 inVec_18;
  inVec_18 = (tmpvar_6 + viewDir_14);
  tmpvar_17 = (inVec_18 * inversesqrt(max (0.001, 
    dot (inVec_18, inVec_18)
  )));
  mediump float tmpvar_19;
  tmpvar_19 = clamp (dot (tmpvar_5, tmpvar_17), 0.0, 1.0);
  mediump float tmpvar_20;
  tmpvar_20 = clamp (dot (tmpvar_5, viewDir_14), 0.0, 1.0);
  mediump float tmpvar_21;
  tmpvar_21 = clamp (dot (tmpvar_6, tmpvar_17), 0.0, 1.0);
  mediump float tmpvar_22;
  tmpvar_22 = (tmpvar_16 * tmpvar_16);
  mediump float tmpvar_23;
  tmpvar_23 = (tmpvar_16 * tmpvar_16);
  mediump float tmpvar_24;
  tmpvar_24 = (tmpvar_23 * tmpvar_23);
  mediump float tmpvar_25;
  tmpvar_25 = (((tmpvar_19 * tmpvar_19) * (tmpvar_24 - 1.0)) + 1.0);
  mediump float x_26;
  x_26 = (1.0 - tmpvar_13);
  mediump float x_27;
  x_27 = (1.0 - tmpvar_20);
  mediump float tmpvar_28;
  tmpvar_28 = (0.5 + ((2.0 * tmpvar_21) * (tmpvar_21 * tmpvar_16)));
  specularTerm_15 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_13) / ((
      (tmpvar_13 * ((tmpvar_20 * (1.0 - tmpvar_22)) + tmpvar_22))
     + 
      (tmpvar_20 * ((tmpvar_13 * (1.0 - tmpvar_22)) + tmpvar_22))
    ) + 1e-05)) * (tmpvar_24 / ((3.141593 * tmpvar_25) * tmpvar_25)))
   * 0.7853982)));
  mediump float tmpvar_29;
  tmpvar_29 = max (0.0, (specularTerm_15 * tmpvar_13));
  specularTerm_15 = tmpvar_29;
  mediump float x_30;
  x_30 = (1.0 - tmpvar_21);
  mediump vec4 tmpvar_31;
  tmpvar_31.w = 1.0;
  tmpvar_31.xyz = ((tmpvar_3 * (tmpvar_12 * 
    (((1.0 + (
      (tmpvar_28 - 1.0)
     * 
      ((x_26 * x_26) * ((x_26 * x_26) * x_26))
    )) * (1.0 + (
      (tmpvar_28 - 1.0)
     * 
      ((x_27 * x_27) * ((x_27 * x_27) * x_27))
    ))) * tmpvar_13)
  )) + ((tmpvar_29 * tmpvar_12) * (tmpvar_4 + 
    ((1.0 - tmpvar_4) * ((x_30 * x_30) * ((x_30 * x_30) * x_30)))
  )));
  mediump vec4 xlat_varoutput_32;
  xlat_varoutput_32.xyz = tmpvar_31.xyz;
  xlat_varoutput_32.w = 1.0;
  gl_FragData[0] = xlat_varoutput_32;
}


#endif
"
}
SubProgram "gles " {
Keywords { "POINT_COOKIE" "SHADOWS_CUBE" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesTANGENT;
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
attribute vec4 _glesMultiTexCoord0;
attribute vec4 _glesMultiTexCoord1;
uniform highp vec3 _WorldSpaceCameraPos;
uniform highp vec4 _WorldSpaceLightPos0;
uniform highp vec4 _LightPositionRange;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp vec4 unity_WorldTransformParams;
uniform highp vec4 _MainTex_ST;
uniform highp vec4 _DetailAlbedoMap_ST;
uniform mediump float _UVSec;
uniform mediump mat4 _LightMatrix0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec3 xlv_TEXCOORD5;
varying highp vec3 xlv_TEXCOORD6;
void main ()
{
  mediump vec3 tmpvar_1;
  tmpvar_1 = _glesNormal;
  highp vec2 tmpvar_2;
  tmpvar_2 = _glesMultiTexCoord0.xy;
  highp vec2 tmpvar_3;
  tmpvar_3 = _glesMultiTexCoord1.xy;
  mediump vec4 tmpvar_4;
  tmpvar_4 = _glesTANGENT;
  highp vec3 lightDir_5;
  highp mat3 tangentToWorld_6;
  highp vec4 tmpvar_7;
  mediump vec4 tmpvar_8;
  mediump vec4 tmpvar_9;
  mediump vec4 tmpvar_10;
  highp vec4 tmpvar_11;
  tmpvar_11 = (_Object2World * _glesVertex);
  tmpvar_7 = (glstate_matrix_mvp * _glesVertex);
  highp vec4 texcoord_12;
  texcoord_12.xy = ((_glesMultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  highp vec2 tmpvar_13;
  if ((_UVSec == 0.0)) {
    tmpvar_13 = tmpvar_2;
  } else {
    tmpvar_13 = tmpvar_3;
  };
  texcoord_12.zw = ((tmpvar_13 * _DetailAlbedoMap_ST.xy) + _DetailAlbedoMap_ST.zw);
  mediump vec3 n_14;
  n_14 = (tmpvar_11.xyz - _WorldSpaceCameraPos);
  highp vec3 norm_15;
  norm_15 = tmpvar_1;
  highp vec4 v_16;
  v_16.x = _World2Object[0].x;
  v_16.y = _World2Object[1].x;
  v_16.z = _World2Object[2].x;
  v_16.w = _World2Object[3].x;
  highp vec4 v_17;
  v_17.x = _World2Object[0].y;
  v_17.y = _World2Object[1].y;
  v_17.z = _World2Object[2].y;
  v_17.w = _World2Object[3].y;
  highp vec4 v_18;
  v_18.x = _World2Object[0].z;
  v_18.y = _World2Object[1].z;
  v_18.z = _World2Object[2].z;
  v_18.w = _World2Object[3].z;
  highp vec3 tmpvar_19;
  tmpvar_19 = normalize(((
    (v_16.xyz * norm_15.x)
   + 
    (v_17.xyz * norm_15.y)
  ) + (v_18.xyz * norm_15.z)));
  highp vec3 dir_20;
  dir_20 = tmpvar_4.xyz;
  highp mat3 tmpvar_21;
  tmpvar_21[0] = _Object2World[0].xyz;
  tmpvar_21[1] = _Object2World[1].xyz;
  tmpvar_21[2] = _Object2World[2].xyz;
  highp vec4 tmpvar_22;
  tmpvar_22.xyz = normalize((tmpvar_21 * dir_20));
  tmpvar_22.w = tmpvar_4.w;
  mediump vec3 normal_23;
  normal_23 = tmpvar_19;
  mediump vec3 tangent_24;
  tangent_24 = tmpvar_22.xyz;
  mediump float tangentSign_25;
  tangentSign_25 = tmpvar_22.w;
  mediump float xlat_varsign_26;
  highp float tmpvar_27;
  tmpvar_27 = (tangentSign_25 * unity_WorldTransformParams.w);
  xlat_varsign_26 = tmpvar_27;
  mediump vec3 tmpvar_28;
  tmpvar_28 = (((normal_23.yzx * tangent_24.zxy) - (normal_23.zxy * tangent_24.yzx)) * xlat_varsign_26);
  mediump mat3 tmpvar_29;
  tmpvar_29[0].x = tangent_24.x;
  tmpvar_29[0].y = tmpvar_28.x;
  tmpvar_29[0].z = normal_23.x;
  tmpvar_29[1].x = tangent_24.y;
  tmpvar_29[1].y = tmpvar_28.y;
  tmpvar_29[1].z = normal_23.y;
  tmpvar_29[2].x = tangent_24.z;
  tmpvar_29[2].y = tmpvar_28.z;
  tmpvar_29[2].z = normal_23.z;
  tangentToWorld_6 = tmpvar_29;
  highp vec3 v_30;
  v_30.x = tangentToWorld_6[0].x;
  v_30.y = tangentToWorld_6[1].x;
  v_30.z = tangentToWorld_6[2].x;
  tmpvar_8.xyz = v_30;
  highp vec3 v_31;
  v_31.x = tangentToWorld_6[0].y;
  v_31.y = tangentToWorld_6[1].y;
  v_31.z = tangentToWorld_6[2].y;
  tmpvar_9.xyz = v_31;
  highp vec3 v_32;
  v_32.x = tangentToWorld_6[0].z;
  v_32.y = tangentToWorld_6[1].z;
  v_32.z = tangentToWorld_6[2].z;
  tmpvar_10.xyz = v_32;
  highp vec3 tmpvar_33;
  tmpvar_33 = (_WorldSpaceLightPos0.xyz - (tmpvar_11.xyz * _WorldSpaceLightPos0.w));
  mediump vec3 n_34;
  n_34 = tmpvar_33;
  mediump vec3 tmpvar_35;
  tmpvar_35 = normalize(n_34);
  lightDir_5 = tmpvar_35;
  tmpvar_8.w = lightDir_5.x;
  tmpvar_9.w = lightDir_5.y;
  tmpvar_10.w = lightDir_5.z;
  gl_Position = tmpvar_7;
  xlv_TEXCOORD0 = texcoord_12;
  xlv_TEXCOORD1 = normalize(n_14);
  xlv_TEXCOORD2 = tmpvar_8;
  xlv_TEXCOORD2_1 = tmpvar_9;
  xlv_TEXCOORD2_2 = tmpvar_10;
  highp vec4 tmpvar_36;
  tmpvar_36 = (_Object2World * _glesVertex);
  xlv_TEXCOORD5 = (_LightMatrix0 * tmpvar_36).xyz;
  xlv_TEXCOORD6 = (tmpvar_36.xyz - _LightPositionRange.xyz);
}


#endif
#ifdef FRAGMENT
uniform highp vec4 _LightPositionRange;
uniform mediump vec4 _LightShadowData;
uniform mediump vec4 unity_ColorSpaceDielectricSpec;
uniform lowp vec4 _LightColor0;
uniform mediump vec4 _Color;
uniform sampler2D _MainTex;
uniform mediump float _Metallic;
uniform mediump float _Glossiness;
uniform highp samplerCube _ShadowMapTexture;
uniform lowp samplerCube _LightTexture0;
uniform sampler2D _LightTextureB0;
varying highp vec4 xlv_TEXCOORD0;
varying mediump vec3 xlv_TEXCOORD1;
varying mediump vec4 xlv_TEXCOORD2;
varying mediump vec4 xlv_TEXCOORD2_1;
varying mediump vec4 xlv_TEXCOORD2_2;
varying highp vec3 xlv_TEXCOORD5;
varying highp vec3 xlv_TEXCOORD6;
void main ()
{
  lowp vec4 tmpvar_1;
  tmpvar_1 = texture2D (_MainTex, xlv_TEXCOORD0.xy);
  mediump vec3 tmpvar_2;
  tmpvar_2 = (_Color.xyz * tmpvar_1.xyz);
  mediump vec3 tmpvar_3;
  mediump vec3 tmpvar_4;
  tmpvar_4 = mix (unity_ColorSpaceDielectricSpec.xyz, tmpvar_2, vec3(_Metallic));
  tmpvar_3 = (tmpvar_2 * (unity_ColorSpaceDielectricSpec.w - (_Metallic * unity_ColorSpaceDielectricSpec.w)));
  mediump vec3 tmpvar_5;
  tmpvar_5 = normalize(xlv_TEXCOORD2_2.xyz);
  mediump vec3 tmpvar_6;
  tmpvar_6.x = xlv_TEXCOORD2.w;
  tmpvar_6.y = xlv_TEXCOORD2_1.w;
  tmpvar_6.z = xlv_TEXCOORD2_2.w;
  highp float tmpvar_7;
  tmpvar_7 = dot (xlv_TEXCOORD5, xlv_TEXCOORD5);
  lowp vec4 tmpvar_8;
  tmpvar_8 = texture2D (_LightTextureB0, vec2(tmpvar_7));
  lowp vec4 tmpvar_9;
  tmpvar_9 = textureCube (_LightTexture0, xlv_TEXCOORD5);
  highp float mydist_10;
  mydist_10 = ((sqrt(
    dot (xlv_TEXCOORD6, xlv_TEXCOORD6)
  ) * _LightPositionRange.w) * 0.97);
  highp float tmpvar_11;
  tmpvar_11 = dot (textureCube (_ShadowMapTexture, xlv_TEXCOORD6), vec4(1.0, 0.003921569, 1.53787e-05, 6.030863e-08));
  mediump float tmpvar_12;
  if ((tmpvar_11 < mydist_10)) {
    tmpvar_12 = _LightShadowData.x;
  } else {
    tmpvar_12 = 1.0;
  };
  mediump vec3 tmpvar_13;
  tmpvar_13 = _LightColor0.xyz;
  mediump float tmpvar_14;
  tmpvar_14 = clamp (dot (tmpvar_5, tmpvar_6), 0.0, 1.0);
  tmpvar_13 = (tmpvar_13 * ((tmpvar_8.w * tmpvar_9.w) * tmpvar_12));
  mediump vec3 viewDir_15;
  viewDir_15 = -(xlv_TEXCOORD1);
  mediump float specularTerm_16;
  mediump float tmpvar_17;
  tmpvar_17 = (1.0 - _Glossiness);
  mediump vec3 tmpvar_18;
  mediump vec3 inVec_19;
  inVec_19 = (tmpvar_6 + viewDir_15);
  tmpvar_18 = (inVec_19 * inversesqrt(max (0.001, 
    dot (inVec_19, inVec_19)
  )));
  mediump float tmpvar_20;
  tmpvar_20 = clamp (dot (tmpvar_5, tmpvar_18), 0.0, 1.0);
  mediump float tmpvar_21;
  tmpvar_21 = clamp (dot (tmpvar_5, viewDir_15), 0.0, 1.0);
  mediump float tmpvar_22;
  tmpvar_22 = clamp (dot (tmpvar_6, tmpvar_18), 0.0, 1.0);
  mediump float tmpvar_23;
  tmpvar_23 = (tmpvar_17 * tmpvar_17);
  mediump float tmpvar_24;
  tmpvar_24 = (tmpvar_17 * tmpvar_17);
  mediump float tmpvar_25;
  tmpvar_25 = (tmpvar_24 * tmpvar_24);
  mediump float tmpvar_26;
  tmpvar_26 = (((tmpvar_20 * tmpvar_20) * (tmpvar_25 - 1.0)) + 1.0);
  mediump float x_27;
  x_27 = (1.0 - tmpvar_14);
  mediump float x_28;
  x_28 = (1.0 - tmpvar_21);
  mediump float tmpvar_29;
  tmpvar_29 = (0.5 + ((2.0 * tmpvar_22) * (tmpvar_22 * tmpvar_17)));
  specularTerm_16 = sqrt(max (0.0001, (
    (((2.0 * tmpvar_14) / ((
      (tmpvar_14 * ((tmpvar_21 * (1.0 - tmpvar_23)) + tmpvar_23))
     + 
      (tmpvar_21 * ((tmpvar_14 * (1.0 - tmpvar_23)) + tmpvar_23))
    ) + 1e-05)) * (tmpvar_25 / ((3.141593 * tmpvar_26) * tmpvar_26)))
   * 0.7853982)));
  mediump float tmpvar_30;
  tmpvar_30 = max (0.0, (specularTerm_16 * tmpvar_14));
  specularTerm_16 = tmpvar_30;
  mediump float x_31;
  x_31 = (1.0 - tmpvar_22);
  mediump vec4 tmpvar_32;
  tmpvar_32.w = 1.0;
  tmpvar_32.xyz = ((tmpvar_3 * (tmpvar_13 * 
    (((1.0 + (
      (tmpvar_29 - 1.0)
     * 
      ((x_27 * x_27) * ((x_27 * x_27) * x_27))
    )) * (1.0 + (
      (tmpvar_29 - 1.0)
     * 
      ((x_28 * x_28) * ((x_28 * x_28) * x_28))
    ))) * tmpvar_14)
  )) + ((tmpvar_30 * tmpvar_13) * (tmpvar_4 + 
    ((1.0 - tmpvar_4) * ((x_31 * x_31) * ((x_31 * x_31) * x_31)))
  )));
  mediump vec4 xlat_varoutput_33;
  xlat_varoutput_33.xyz = tmpvar_32.xyz;
  xlat_varoutput_33.w = 1.0;
  gl_FragData[0] = xlat_varoutput_33;
}


#endif
"
}
}
Program "fp" {
SubProgram "gles " {
Keywords { "POINT" "SHADOWS_OFF" }
""
}
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_OFF" }
""
}
SubProgram "gles " {
Keywords { "SPOT" "SHADOWS_OFF" }
""
}
SubProgram "gles " {
Keywords { "POINT_COOKIE" "SHADOWS_OFF" }
""
}
SubProgram "gles " {
Keywords { "DIRECTIONAL_COOKIE" "SHADOWS_OFF" }
""
}
SubProgram "gles " {
Keywords { "SPOT" "SHADOWS_DEPTH" "SHADOWS_NONATIVE" }
""
}
SubProgram "gles " {
Keywords { "SPOT" "SHADOWS_DEPTH" "SHADOWS_NATIVE" }
""
}
SubProgram "gles " {
Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" }
""
}
SubProgram "gles " {
Keywords { "DIRECTIONAL_COOKIE" "SHADOWS_SCREEN" }
""
}
SubProgram "gles " {
Keywords { "POINT" "SHADOWS_CUBE" }
""
}
SubProgram "gles " {
Keywords { "POINT_COOKIE" "SHADOWS_CUBE" }
""
}
}
 }
 Pass {
  Name "SHADOWCASTER"
  Tags { "LIGHTMODE"="SHADOWCASTER" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" }
  GpuProgramID 488501
Program "vp" {
SubProgram "gles " {
Keywords { "SHADOWS_DEPTH" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesVertex;
attribute vec3 _glesNormal;
uniform highp vec4 _WorldSpaceLightPos0;
uniform highp vec4 unity_LightShadowBias;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
uniform highp mat4 _World2Object;
uniform highp mat4 unity_MatrixVP;
void main ()
{
  highp vec3 vertex_1;
  vertex_1 = _glesVertex.xyz;
  highp vec4 clipPos_2;
  if ((unity_LightShadowBias.z != 0.0)) {
    highp vec4 tmpvar_3;
    tmpvar_3.w = 1.0;
    tmpvar_3.xyz = vertex_1;
    highp vec3 tmpvar_4;
    tmpvar_4 = (_Object2World * tmpvar_3).xyz;
    highp vec4 v_5;
    v_5.x = _World2Object[0].x;
    v_5.y = _World2Object[1].x;
    v_5.z = _World2Object[2].x;
    v_5.w = _World2Object[3].x;
    highp vec4 v_6;
    v_6.x = _World2Object[0].y;
    v_6.y = _World2Object[1].y;
    v_6.z = _World2Object[2].y;
    v_6.w = _World2Object[3].y;
    highp vec4 v_7;
    v_7.x = _World2Object[0].z;
    v_7.y = _World2Object[1].z;
    v_7.z = _World2Object[2].z;
    v_7.w = _World2Object[3].z;
    highp vec3 tmpvar_8;
    tmpvar_8 = normalize(((
      (v_5.xyz * _glesNormal.x)
     + 
      (v_6.xyz * _glesNormal.y)
    ) + (v_7.xyz * _glesNormal.z)));
    highp float tmpvar_9;
    tmpvar_9 = dot (tmpvar_8, normalize((_WorldSpaceLightPos0.xyz - 
      (tmpvar_4 * _WorldSpaceLightPos0.w)
    )));
    highp vec4 tmpvar_10;
    tmpvar_10.w = 1.0;
    tmpvar_10.xyz = (tmpvar_4 - (tmpvar_8 * (unity_LightShadowBias.z * 
      sqrt((1.0 - (tmpvar_9 * tmpvar_9)))
    )));
    clipPos_2 = (unity_MatrixVP * tmpvar_10);
  } else {
    highp vec4 tmpvar_11;
    tmpvar_11.w = 1.0;
    tmpvar_11.xyz = vertex_1;
    clipPos_2 = (glstate_matrix_mvp * tmpvar_11);
  };
  highp vec4 clipPos_12;
  clipPos_12.xyw = clipPos_2.xyw;
  clipPos_12.z = (clipPos_2.z + clamp ((unity_LightShadowBias.x / clipPos_2.w), 0.0, 1.0));
  clipPos_12.z = mix (clipPos_12.z, max (clipPos_12.z, -(clipPos_2.w)), unity_LightShadowBias.y);
  gl_Position = clipPos_12;
}


#endif
#ifdef FRAGMENT
void main ()
{
  gl_FragData[0] = vec4(0.0, 0.0, 0.0, 0.0);
}


#endif
"
}
SubProgram "gles " {
Keywords { "SHADOWS_CUBE" }
"#version 100

#ifdef VERTEX
attribute vec4 _glesVertex;
uniform highp vec4 _LightPositionRange;
uniform highp mat4 glstate_matrix_mvp;
uniform highp mat4 _Object2World;
varying highp vec3 xlv_TEXCOORD0;
void main ()
{
  xlv_TEXCOORD0 = ((_Object2World * _glesVertex).xyz - _LightPositionRange.xyz);
  gl_Position = (glstate_matrix_mvp * _glesVertex);
}


#endif
#ifdef FRAGMENT
uniform highp vec4 _LightPositionRange;
uniform highp vec4 unity_LightShadowBias;
varying highp vec3 xlv_TEXCOORD0;
void main ()
{
  mediump vec4 tmpvar_1;
  highp vec4 enc_2;
  highp vec4 tmpvar_3;
  tmpvar_3 = fract((vec4(1.0, 255.0, 65025.0, 1.658138e+07) * min (
    ((sqrt(dot (xlv_TEXCOORD0, xlv_TEXCOORD0)) + unity_LightShadowBias.x) * _LightPositionRange.w)
  , 0.999)));
  enc_2 = (tmpvar_3 - (tmpvar_3.yzww * 0.003921569));
  tmpvar_1 = enc_2;
  gl_FragData[0] = tmpvar_1;
}


#endif
"
}
}
Program "fp" {
SubProgram "gles " {
Keywords { "SHADOWS_DEPTH" }
""
}
SubProgram "gles " {
Keywords { "SHADOWS_CUBE" }
""
}
}
 }
}
Fallback "VertexLit"
}